_class='btn btn-primary'_class='btn btn-danger'--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/IEWkmxjLqcA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
How do i change the class of a custom and/or standard form button. Is there an example you can reference? Again, thank you for the assistance
form.custom.submit.add_class('my_class')form.custom.submit['_class'] = 'my_class'On Saturday, February 17, 2018 at 10:57:08 AM UTC-5, F.C. wrote:How do i change the class of a custom and/or standard form button. Is there an example you can reference? Again, thank you for the assistanceTo add a class to the submit button:form.custom.submit.add_class('my_class')To completely change the class:form.custom.submit['_class'] = 'my_class'
You can also use .element() (as described here) to find and manipulate any DOM element within the form.Finally, SQLFORM takes a "formstyle" argument, which can be a function that produces the form DOM. For examples of how the function should work, see for example: https://github.com/web2py/web2py/blob/82cf2eb44db907a3ca20c29ee8116f95ef77bb5a/gluon/sqlhtml.py#L991.
Anthony
--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/IEWkmxjLqcA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.