form[0][-1][1][0]['_class']='sbmcls'

or

form.element(_type='submit')['_class']='sbmcls'

On Feb 9, 8:27 am, DenesL <denes1...@yahoo.ca> wrote:
> With SQLFORM the submit button resides in the last row, second column.
> So form[0][-1][1][0] is the button.
>
> form[0] is the FORM
> form[0][-1] is the form's last row (TR)
> form[0][-1][1] is the second column (TD)
> form[0][-1][1][0] is the submit button (INPUT)
>
> you can change the class by
> form[0][-1][1][0]['_class']='sbmcls'
>
> Other elements can also be accesed this way or by name doing
> form.element(_name='fieldname')
> and changing the class would be
> form.element(_name='fieldname')['_class']='newclass'
> but note that web2py also uses those classes, e.g. an integer field
> will have class="integer".
>
> Best regards,
> Denes

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.

Reply via email to