it's a bit tricky but possible:

# you can find child element by css/jquery selector:
el = in_form.element('input[name=user]') # but  'input[name = user]' - doesn't 
work, i.e. spaces do matter
#you can also: el = form.element('input',  _name = 'user')
el['_style'] = 'width:50%;'



On Monday, February 11, 2019 at 9:07:47 PM UTC+3, Ben Duncan wrote:
>
> How can you over rider the default CSS in sqlform(.factory) ...
> i.e.:
>  in_form = SQLFORM.factory(
>         Field('userid', label='User Id: ', requires=IS_NOT_EMPTY(), 
> _style='width: 50%'),
>         Field('password', label='Password', type='password', 
> requires=IS_NOT_EMPTY()),
>         formstyle='divs',
>         submit_button=' Submit ',
>         )
>
> _style as shown above is not accepted ...
>
> Thanks ...
>
> *Ben Duncan*
> DBA / Chief Software Architect 
> Mississippi State Supreme Court
> Electronic Filing Division
>

-- 
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