Thank you for your comments.

field validators IS_IN_SET and IS_IN_DB trigger SELECT/OPTION
automatically. You can do

INPUT(_name='fieldname',requires=IS_IN_DB(db,'table.field','%
(otherfieldname)s')

On Apr 18, 4:58 am, Timmie <timmichel...@gmx-topmail.de> wrote:
> Hello,
> I am new to web2py and lately bought the manual.
> It is really cool how fast you can generate a application with so few
> code!
>
> I need more explanation about prepopulating forms.
>
> I would like to have the following:
>
> <select>
>   <option value="volvo">Volvo</option>
>   <option value="saab">Saab</option>
>   <option value="mercedes">Mercedes</option>
>   <option value="new_value">Enter New Item</option>
> </select>
>
> Where volvo, saab, mercedes shall be popoulated from the database and
> new_value shall give the oportunity to enter a new string.
>
> Can you give me an example on how to achieve this?
>
> (adapted fromhttp://www.w3schools.com/tags/tag_select.asp)
>
> As an extended functionality, I will pre-populate other form field
> when a existing values (e.g. volvo) is selected.
> I will try to use the hint from
> Using Ajax with 
> formshttp://groups.google.com/group/web2py/browse_thread/thread/2e1498efdd...
>
> Thanks in advance & regards,
> Timmie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to