Programmer's Reference Guide

Chapter 19. Zend_Form

Table of Contents

19.1. Zend_Form
19.2. Zend_Form Quick Start
19.2.1. Create a form object
19.2.2. Add elements to the form
19.2.3. Render a form
19.2.4. Check if a form is valid
19.2.5. Get error status
19.2.6. Putting it together
19.2.7. Using a Zend_Config object
19.2.8. Conclusion
19.3. Creating Form Elements Using Zend_Form_Element
19.3.1. Plugin Loaders
19.3.2. Filters
19.3.3. Validators
19.3.3.1. Custom Error Messages
19.3.4. Decorators
19.3.5. Metadata and Attributes
19.3.6. Standard Elements
19.3.7. Zend_Form_Element Methods
19.3.8. Configuration
19.3.9. Custom Elements
19.4. Creating Forms Using Zend_Form
19.4.1. Plugin Loaders
19.4.2. Elements
19.4.2.1. Populating and Retrieving Values
19.4.2.2. Global Operations
19.4.2.3. Methods For Interacting With Elements
19.4.3. Display Groups
19.4.3.1. Global Operations
19.4.3.2. Using Custom Display Group Classes
19.4.3.3. Methods for Interacting With Display Groups
19.4.3.4. Zend_Form_DisplayGroup Methods
19.4.4. Sub Forms
19.4.4.1. Global Operations
19.4.4.2. Methods for Interacting With Sub Forms
19.4.5. Metadata and Attributes
19.4.6. Decorators
19.4.7. Validation
19.4.7.1. Custom Error Messages
19.4.8. Methods
19.4.9. Configuration
19.4.10. Custom forms
19.5. Creating Custom Form Markup Using Zend_Form_Decorator
19.5.1. Operation
19.5.2. Standard Decorators
19.5.3. Custom Decorators
19.5.4. Rendering Individual Decorators
19.6. Standard Form Elements Shipped With Zend Framework
19.6.1. Zend_Form_Element_Button
19.6.2. Zend_Form_Element_Captcha
19.6.3. Zend_Form_Element_Checkbox
19.6.4. Zend_Form_Element_File
19.6.5. Zend_Form_Element_Hidden
19.6.6. Zend_Form_Element_Hash
19.6.7. Zend_Form_Element_Image
19.6.8. Zend_Form_Element_MultiCheckbox
19.6.9. Zend_Form_Element_Multiselect
19.6.10. Zend_Form_Element_Password
19.6.11. Zend_Form_Element_Radio
19.6.12. Zend_Form_Element_Reset
19.6.13. Zend_Form_Element_Select
19.6.14. Zend_Form_Element_Submit
19.6.15. Zend_Form_Element_Text
19.6.16. Zend_Form_Element_Textarea
19.7. Standard Form Decorators Shipped With Zend Framework
19.7.1. Zend_Form_Decorator_Callback
19.7.2. Zend_Form_Decorator_Captcha
19.7.3. Zend_Form_Decorator_Description
19.7.4. Zend_Form_Decorator_DtDdWrapper
19.7.5. Zend_Form_Decorator_Errors
19.7.6. Zend_Form_Decorator_Fieldset
19.7.7. Zend_Form_Decorator_Form
19.7.8. Zend_Form_Decorator_FormElements
19.7.9. Zend_Form_Decorator_HtmlTag
19.7.10. Zend_Form_Decorator_Image
19.7.11. Zend_Form_Decorator_Label
19.7.12. Zend_Form_Decorator_ViewHelper
19.7.13. Zend_Form_Decorator_ViewScript
19.8. Internationalization of Zend_Form
19.8.1. Initializing I18n in Forms
19.8.2. Standard I18n Targets
19.9. Advanced Zend_Form Usage
19.9.1. Array Notation
19.9.2. Multi-Page Forms

19.1. Zend_Form

Zend_Form simplifies form creation and handling in your web application. It accomplishes the following goals:

  • Element input filtering and validation

  • Element ordering

  • Element and Form rendering, including escaping

  • Element and form grouping

  • Element and form-level configuration

It heavily leverages other Zend Framework components to accomplish its goals, including Zend_Config, Zend_Validate, Zend_Filter, Zend_Loader_PluginLoader, and optionally Zend_View.