See
http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910.
Also, SQLField() has been deprecated in favor of Field().
Anthony
On Monday, April 2, 2012 2:38:51 PM UTC-4, visuallinux wrote:
>
> Dear All.
>
> I have the followings on models:
>
>
> db.define_table('province',
> SQLField('name', 'string', length=50, required=True,
> default=None))
>
> db.define_table('cities',
> SQLField('name', 'string', length=50, required=True),
> SQLField('id_province',db.province,
> required=IS_IN_SET(db.province)))
>
> db.define_table('customer',
> SQLField('name', 'string', length=50, required=True),
> SQLField('id_province',db.province,
> required=IS_IN_SET(db.province)),
> SQLField('id_cities',db.cities, required=IS_IN_SET(db.cities)))
>
>
> I need to implement a FORM for create customers so when i selected a
> options in SELECT province the SELECT cities automatically add the cities
> that belong to the province SELECTED.
>
> Any idea how i can do?
>
> Fernando.
>
>