to set attributes of your form input's you could use the FORM() interface, which gives you complete flexibility over the layout. Or if you prefer the convenience of SQLFORM you could subclass a new widget (check out 7.5 in the manual).
On Sep 22, 10:10 am, Arvind <arvind.ran...@gmail.com> wrote: > Hello, > > I am using this in my view > {{=form.custom.widget.txtUserName}} > > and the controller's code is > form = SQLFORM.factory( > Field('txtUserName',requires=IS_NOT_EMPTY())) > > I see that the id for this input field is automatically generated as > no_table_txtUserName > > How can I set this myself ? > > Also, how can i set other attributes of the <INPUT> element , like > class and onfocus, onclick etc. > > thanks > Arvind --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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 -~----------~----~----~----~------~----~------~--~---