Additional examples
Locating examples
If you installed HTML_QuickForm2 with PEAR installer, then its usage examples
are in HTML_QuickForm2/examples
directory under PEAR's
doc_dir
. If you have trouble finding where doc_dir
is, you can use config-show command of PEAR
installer.
List of example files
basic-elements.php
Form showing all built-in elements.
builtin-rules.php
Form showing all built-in rules with server-side and client-side validation.
default-renderer.php
Shows how to customize output of Default Renderer.
dualselect.php
A custom element with a Renderer plugin and additional Javascript library.
hierselect-ajax.php
Shows how to use AJAX requests to load additional options for a Hierselect element.
repeat.php
Demonstrates the Repeat element.
controller/simple.php
Single-page form taking advantage of HTML_QuickForm2_Controller infrastructure.
controller/tabbed.php
Tabbed multipage form: contains buttons that allow going to any page of the form whether current one is valid or not. The global
'Submit'
button will not allow form processing, however, unless all pages are valid.
controller/wizard.php
Wizard-like multipage form: pages contain
'Next'
and'Back'
buttons and you can't go to the next page unless the current page is valid.
renderers/array-twig.php
Shows how to use Array Renderer together with Twig template engine.