Helpers act like dictionaries with respect to their attributes, so you can 
use the Python .update() method:

form.element('input[name=tag]').update(_class='input-small', _placeholder=
'Tag', _style='width: 144px;')

Anthony

On Tuesday, March 12, 2013 9:24:44 AM UTC-4, Annet wrote:
>
> I have the following code to make an SQLFORM and inline form:
>
>  form.element('input[name=tag]')['_class']='input-small'
>  form.element('input[name=tag]')['_placeholder']='Tag'
>  form.element('input[name=tag]')['_style']='width: 144px;'
>
> Is it possible to combine these three statements into one statement?
>
>
> Kind regards,
>
> Annet
>

-- 

--- 
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/groups/opt_out.


Reply via email to