21278 Posts in 5728 Topics by 2599 members
|Go to End|
19 May 2009 at 8:28am
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?
19 May 2009 at 1:52pm Last edited: 19 May 2009 1:53pm
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
|Go to Top|