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.
basic-elements.phpForm showing all built-in elements.
builtin-rules.phpForm showing all built-in rules with server-side and client-side validation.
default-renderer.phpShows how to customize output of Default Renderer.
dualselect.phpA custom element with a Renderer plugin and additional Javascript library.
hierselect-ajax.phpShows how to use AJAX requests to load additional options for a Hierselect element.
repeat.phpDemonstrates the Repeat element.
controller/simple.phpSingle-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.phpShows how to use Array Renderer together with Twig template engine.