The id of the 'type' widget will be 'template_properties_type', so you can 
add JS to the page to listen for the selection event and display/create a 
text box whenever 'custom' is selected. If you want the content of the text 
box saved in the table, you should add a field for it, and initially set 
that field as hidden in the form (and use JS to unhide it).
 
Anthony

On Friday, July 15, 2011 11:42:04 AM UTC-4, sagar wrote:

> I am using sql form 
> db.py 
> data=db.define_table('template_properties', 
>                     Field('temp_uid', 'string',default=uuid.uuid1(), 
> writable=False, readable=False), 
>                     Field('template_name', default=''), 
>                     Field('deadline','datetime'), 
>                     Field('type','string', 
> requires=IS_IN_SET(['onetime','daily','weekly','custom'])), 
>                     ) 
>
>
> I am using sql form 
>
> def add(): 
>          form=SQLFORM(db.template_properties) 
>
>
> I have to add extra textbox once user select custom  value for type 
> field... 
>
>
>
>
>
>
>

Reply via email to