Hi,

I am not sure I understand your question correctly

How do I change the style of a form using SQLFORM?
>

In appconfig.ini you can set:

; form styling
[forms]
formstyle = bootstrap3_stacked
separator =

and then in the db.py file:

## choose a style for forms
response.formstyle = myconf.take('forms.formstyle')  # or 
'bootstrap3_stacked' or 'bootstrap2' or other
response.form_label_separator = myconf.take('forms.separator')


And you can style individual fields:

form.element('input[name=firstName]').update(_class='form-control', 
_placeholder='First name')

I hope this helps you solve the issue.

Kind regards,

Annet

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