How can you add a style class to a form or even a custom form?
I'm using jquery to validate a customform build but I need to add some style classes to the field.
How is this possible?
Terry
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
How can you add a style class to a form or even a custom form?
I'm using jquery to validate a customform build but I need to add some style classes to the field.
How is this possible?
Terry
Adding classes to the form or the form fields? If you want to add classes to a field you can do $field->addExtraClass('Something'); as long as $field is a valid FormField object
See http://api.silverstripe.com/forms/core/FormField.html#addExtraClass for more information