Hello everybody,
I have a table called Person
Db.py
db.define_table('Person',
Field('last name', 'string',label='Last Name'),
Field('First name', 'string',label='First Name'),
Field('City','reference City',label='City', requires =
IS_IN_DB(db,db.City.id,'%(name)s'),
Field('State','reference State',label='State', requires =
IS_IN_DB(db,db.State.id,'%(name)s'))
What I want to do is make a cascading drop down list for all the States
when a City is selected. The thing is I am working with crud forms and I
don't know how to do modify the given crud form to introduce the cascading
default.py
def NewPerson():
return dict(form=crud.create(db.Person, message=T("The person was
created!")))
index.html
{{extend 'layout.html'}}
{{=form}}
Please, someone can help me with the cascade selecting on City and State
dropdown lists.
Thanks.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.