FormTemplateHelper
class FormTemplateHelper (View source)
A helper class for managing Form} and {@link FormField HTML template output.
This primarily exists to maintain backwards compatibility between Form and FormField template changes since developers may rely on specific HTML output in their applications. Any core changes to templates (such as changing ID's) may have the potential to silently prevent websites from working.
To provide a form with a custom FormTemplateHelper use the following snippet:
$form->setTemplateHelper('ClassName');
Globally, the FormTemplateHelper can be set via the Injector API.
For backwards compatibility, with < 3.2 use the FormTemplateHelper_Pre32 class which will preserve the old style form field attributes.
Injector:
FormTemplateHelper:
class: FormTemplateHelper_Pre32