hi

i have page with form and rows. 

form = SQLFORM.factory(Field('tags_ava','list:string',label=T('Tags'),requires 
= IS_EMPTY_OR(IS_IN_SET(tags_ava_set)),
                                    widget=SQLFORM.widgets.options.widget),

based on selected tag (tag1), i get list of entries (with at least tag1), 
and based on that i get new list of available tags (tags which are used 
alongside tag1).
i save that list in session.

session.new_tags_ava_set = new_tags_ava_set

 after reloading the page, i would like to have that new set in dropdown 
list (filed tags_ava).
so this line comes before 'form ='

tags_ava_set = session.new_tags_ava_set

and there i have a problem. requires =  ... works fine. i have to choose 
something from new_tags_ava_set or i get error
but - the entries on dropdown list are not new_tags_ava_set - there are 
more entris. actualy they are from previous step. so i have to click the 
button twice (without changing the values in the form) to populate dropdown 
with the right values. 

my question is: how to prepopulate dropdown with right values

(the logic of my aplication is filtering entries one tag at a time. 
probable something like this should be done with AJAX.:)

andrej  

-- 



Reply via email to