Question

We're wanting to do some fast prototyping using Zurb Foundation on Silverstripe. This is the Silverstripe theme for Foundation: http://silverstripe-foundation.com/kitchen-sink/

The issue is the class "button" has to be applied to form input fields for them to inherit the Foundation styling. Otherwise the browser default is used, which looks bad. Other form fields inherit the correct style.

There's a method addExtraClass in FormField: http://api.silverstripe.org/3.1/source-class-FormField.html#300-314

How would I apply this to all form buttons generated by the framework?

Était-ce utile?

La solution

The developers of this theme recommend you to use the SilverStripe ZURB Foundation Forms Module. This will add all the classes needed by the theme styling for all the form elements automatically.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top