Zend Framework - Building Forms without writing XHTML

This block of text, from the link above, describes a form input for a username element.

#
; username element
user.login.elements.username.type = "text"
user.login.elements.username.options.validators.alnum.validator = "alnum"
user.login.elements.username.options.validators.regex.validator = "regex"
user.login.elements.username.options.validators.regex.options.pattern = "/^[a-z]/i"
user.login.elements.username.options.validators.strlen.validator = "StringLength"
user.login.elements.username.options.validators.strlen.options.min = "6"
user.login.elements.username.options.validators.strlen.options.max = "20"
user.login.elements.username.options.required = true
user.login.elements.username.options.filters.lower.filter = "StringToLower"

This is the code in the Form which uses the .ini settings:

      $config = new Zend_Config_Ini($configFile, 'development');
      $form   = new Zend_Form($config->user->login);

And the entire form is displayed with:

      <?php echo $this->form ?>

With the routine, repetitive, and time-consuming exercise of writing XHTML eliminated, you can focus on the business logic, and build applications lightening fast.

You retain complete control of the output, decorators are used to apply the XHTML to the form elements. You can create one decorator for the entire system, and your whole application will have a consistent interface.