HTML_QuickForm_Renderer_ArraySmarty

HTML_QuickForm_Renderer_ArraySmarty

HTML_QuickForm_Renderer_ArraySmarty -- A renderer for 'static' Smarty templates

Description

This renderer was written by Thomas Schulz. It is based on pre-3.0 HTML_QuickForm::toArray() code and ITStatic renderer. It can be used to output the form into the 'static' Smarty template. Usage example for this is available in docs/renderers.

The form array structure is the following:
array (
 ['frozen']       => 'whether the complete form is frozen',
 ['javascript']   => 'javascript for client-side validation',
 ['attributes']   => 'attributes for <form> tag',
 ['hidden']       => 'html of all hidden elements',
 ['requirednote'] => 'note about the required elements',
 ['errors'] => Array
     (
         ['1st_element_name'] => 'Error for the 1st element',
         ...
         ['nth_element_name'] => 'Error for the nth element',
     ),

 ['header'] => Array
     (
         ['1st_header_name'] => 'Header text for the 1st header',
         ...
         ['nth_header_name'] => 'Header text for the nth header'
     ),

 ['1st_element_name'] => 'Array for the 1st element',
 ...
 ['nth_element_name'] => Array for the nth element'
);
where an element array has the form:
array(
         ['name']      => 'element name',
         ['value']     => 'element value',
         ['type']      => 'type of the element',
         ['frozen']    => 'whether element is frozen',
         ['label']     => 'label for the element',
         ['required']  => 'whether element is required',
// if element is not a group:
         ['html']      => 'HTML for the element',
// if element is a group:
         ['separator'] => 'separator for group elements',
         ['1st_gitem_name'] => 'Array for the 1st element in group',
         ...
         ['nth_gitem_name'] => 'Array for the nth element in group'
);

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.