Maintainer(s):
pasinter
Supported by: Not supported
Visit the support forum Download
Silverstripe FormFields offers an alternative approach to form rendering. Instead of relying on hardcoded tag generation, this module uses simple template files to generate form field tags. This allows easy customisation of forms without having to change a single line in the Silverstripe core.
Silverstripe FormFields offers an alternative approach to form rendering. Instead of relying on hardcoded tag generation, this module uses simple template files to generate form field tags. This allows easy customisation of forms without having to change a single line in the Silverstripe core.
Standard Silverstripe uses the Form.ss templateto render forms. Form.ss template calls the FormField::FieldHolder method which takes care of rendering the input tag:
<% control Fields >
$FieldHolder
< end_control %>
Silverstripe FormFields moves the rendering into templates by using include statement. To enable Silverstripe FormFields, just change the above code to:
<% control Fields >
< include FormField >
< end_control %>
The above code just includes the FormField.ss template which renders the field. This is all that is required to take advantage of this module.
Note: the rendering of the field’s error messages has been modified in these tempaltes to conform to the jQuery’s validate plugin – http://docs.jquery.com/Plugins/Validation. All other functionality is still the same.
Note 2: Only fields of types textarea, text, email, password and listbox are rendered via templates. For all other fields Silverstripe FormFields falls back to the $FieldHolder functionality. This can bea easily tweaked in the FormField.ss template per your needs.
Version:
[v0.01]
Date: 2010-05-20
Compatible with: SilverStripe 2.3
Download:
pasinter-Silverstripe-FormFields-a68834e.tar.gz
Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com
Comments on this website? Please give feedback.