FORM and SQLFORM are just HTML helpers, so you can add HTML attributes to 
them when they are constructed as well:

myform = SQLFORM.factory(..., _id='myformid')

Anthony

On Friday, August 28, 2015 at 2:55:18 AM UTC-4, at wrote:
>
> Ok, got it.
>
>
> myform = SQLFORM.factory(
>         Field('title', label=T('Title'), requires=IS_NOT_EMPTY()),
> .
> .
> .
>         )
> myform['_id'] = 'myformid'
>
>
>
> On Friday, 28 August 2015 10:54:08 UTC+5, at wrote:
>>
>> Hi,
>>
>> A quick and silly question:
>> *How to define id for a form created with SQLFORM.factory?*
>>
>> 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.

Reply via email to