Generating and validating web forms with pear htmlquickform 2 way video chat rooms
Use add Element('header') and add Element('html').- If you want to customize form output, do so by using a renderer object.
set Element Template() and the like are now deprecated.* Changes- Added support for external renderers, added a default and an array renderer based on old Quick Form code (Alexey Borzov)- Added a dynamic ITX/Sigma renderer with examples (Alexey Borzov)- Added a static ITX/Sigma renderer with examples (Bertrand Mansion)- Added possibility to validate a group with a function using add Rule() (Bertrand Mansion)- Added possibility to validate groups when append Name is false (Bertrand Mansion)- Rules are validated in the order they are set (Bertrand Mansion)- Fixed problems when validating a file not uploaded (Frederic Poeydomenge, Bertrand Mansion)- add Header() and add Data() now call add Element(), added new 'header' and 'html' elements (Alexey Borzov)- Got rid of registering filters, now only function existence is checked.
This works with every type of elements or groups, integer 0 is not considered as an empty value.
The HTML_Quick Form::validate() method will scan through each rules in the order they have been set.
The new PEAR package HTML_Quick Form-3.0 (beta) has been released at
Deprecated features:- add Header() and add Data(), while still there, are deprecated.Currentlyavailable renderers are: Default - based on old to Html() code, Array - based on old to Array() code, ITStatic and ITDynamic - these workthrough an ITX/Sigma template engine. It is also tested if the file has been uploaded.- Static elements Headers and Data (html) elements are treated like other form elements.More renderers are expected to follow.- Validation Validation rules are tested in the order they are set. Headers can have a name, this makes it possible to use different templatesfor different headers.- XHTMLHTML_Common and Quick Form have been reworked to be more XHTML compliant.* Migration to 3.0Incompatibilities:- Filters registration is not used anymore.Just give apply Filter() the function name as a parameter.- to Array() now returns a different structure and calls an external renderer: elements in groups are rendered as seperate elements, every element has a numeric index for key.- Validation rules are validated in the order they were set.- File validation happens only when the file is required.- Direct calls to on Quick Form Event() with 'set Default' and 'set Constant' events won't work anymore, these events have been replaced by an 'update Value' event.- Grouped elements index is now a numeric key only.This can break some group rules if you used their associative key in add Group Rule().- Groups must have a name.
There are moves underfoot to rewrite both of these packages for PHP 5 (in the form of HTML_Quick Form2, and HTML_Common2), but as yet neither has been released.