-
Notifications
You must be signed in to change notification settings - Fork 3
Ztal Form
Ztal can happily process Zend_Form instances without issue but Zend_Form does a lot of work setting up translation and decorators that Ztal has no use for. Ztal_Form is a very small subclass of Zend_Form that will automatically disable decorator initialisation on any elements added to the form via the normal methods and will also disable translation setup for the form itself. In all other respects, Ztal_Form behaves exactly like the parent Zend_Form.
When writing new form subclasses it is recommended to subclass from Ztal_Form rather than Zend_Form and replacing Zend_Form with Ztal_Form is usually also the quickest way to start a migration of existing Zend_Form subclasses.
Decorators are not supported by Ztal as they are a terrible idea that breaks the entire MVC concept. Additionally, Ztal does not support arbitrary attributes on elements. However a number of standard attributes are supported on elements and there is support for defining the name of a custom macro to use when rendering an element.
- class - The class(es) for the form element
- macro - The path for a custom macro to render the element
- errorMacro - The path for a custom macro to render errors for the element
- maxlength
- autocomplete
- rows
- cols
- sort - Apply a sort to the select options after translation. Uses the sort tale.
- type