An ajax autocomplete field would be a better option IMO. There is an experimental AutocompleteWidget in web2py but I believe it still has some issues plus it might not allow enough customization of the query depending on your particular needs in this case. You can create your own widget though.
On Mar 3, 2:29 pm, "[email protected]" <[email protected]> wrote: > Thanks for all the help again. It should have been obvious to me > before but I am sure the problem is that values coming back from > get_last_names() are different when the form is generated compared to > when it is validated. So I really need to just get the list of last > names once and it use it both times. > > The question is how to do that. Does this look like a good approach? I > tried it and it seems to work. > > if request.vars: > db.reg_test.last_name.requires = IS_IN_SET( session.last_names, > zero = "Select a Last Name" ) > else: > session.last_names = get_last_names() > db.reg_test.last_name.requires = IS_IN_SET( session.last_names, > zero = "Select a Last Name" ) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

