This widget wouldn't break appadmin? would it? These are the many unknown 
things that really frustrate me about web2py.

I edited the models file to test my current troubles adding columns to 
tables that are already created. With your sample app, I was able to add 
the new table and then add columns to cats. However when i edited the cat 
to add a color or collar those new values were not saved.


db.define_table('collars',
                Field('material', requires=IS_IN_SET(['leather', 'chain'])),
                Field('size', requires=IS_IN_SET(['small', 'med', 
'large'])),
                format='%(size)s %(material)s')

db.define_table('cat',
    Field('name','string'),
    Field('color', 'string'),
    Field('collar', 'reference collars'),
    Field('person_id', 'reference person', 
        widget=AutocompleteWidgetSelectOrAddOption(request, 
            db.person.first_name, 
            id_field=db.person.id, 
            limitby=(0,10), 
            min_length=2, 
            form_title=T('Add new person'), 
            controller="default", 
            function="add_person", 
            button_text = T('Add new'))
        ),
    format='%()s'
    )

Regards,
Bill

-- 



Reply via email to