Pyrus Install

Download

* PHP-style Unicode escape codes in regular expressions are translated to
Javascript-style ones when using client-side validation (bug #12736)
* Rules for grouped elements were not removed when removing a group via
removeElement() method (bug #14540)
* Allow setting $collectHidden parameter in constructor of ArraySmarty
renderer, as allowed in constructor of Array renderer (bug #14995)
* Element name was not removed from $_required array in removeElement()
(bug #15520)
* Third and subsequent selects in hierselect could be not cleared under some
circumstances (bug #15955)

Pyrus Install

Download

* An error in date's setValue() method prevented setting the 'empty' value
as the default one (bug #11717)
* A space could be displayed instead of '0' for frozen elements with value
set to '0' (bug #11995)
* Validation rules on file uploads will be skipped only if no upload was
attempted, not if it failed for some reason (bug #12014)
* 'filename' rule returned integer instead of expected boolean (bug #12015)
* Regexps in Default renderer missed necessary 's' modifier (bug #12026)

Pyrus Install

Download

Development of QuickForm version 3 is now frozen. Only bug fixing will be
done. All feature requests should be submitted for HTML_QuickForm2 package.

Bugfixes:
* Typo in javascript generated for form validation (bug #5205)
* Default values for single-selects were ignored if form was considered
submitted (bug #5269)
* Fixed array-based options for HTML_QuickForm_date (bug #5364)
* Javascript validation of single radiobutton failed (bug #5644)
* Incorrect fetch mode used in HTML_QuickForm_select::loadDbResult()
(bug #5705)
* Removed unused variables found by code analysis (bug #5920)
* hierselect now works correctly with HTML entities in option texts,
fix idea borrowed from Prototype JS library (bug #5974)
* advcheckbox failed to submit properly if its id attribute was set equal
to its name, due to javascript problems (bug #6134)
* HTML_QuickForm_hierselect::setValue() should not decrease the number of
select elements in hierselect (bug #6766)
* HTML_QuickForm::isTypeRegistered() is now case-insensitive (bug #7342)
* Form is considered not valid after explicitly adding error via
HTML_QuickForm::setElementError() (bug #7470)
* Regexps for 'error' and 'required' blocks in Default renderer now match
ungreedy, this allows having several such blocks in a template (bug #7820)
* Document the return value of HTML_QuickForm_file::moveUploadedFile()
(bug #7832)

Additions and changes:
* Traditional Chinese translation for date element (request #5165)
* Brazilian Portuguese translation for date element (request #5541)
* An error message for element is now removed if removing the element via
HTML_QuickForm::removeElement(..., true) or passing an empty argument to
HTML_QuickForm::setElementError().
* advcheckbox element no longer uses any javascript, therefore its JS-related
methods getOnclickJS() and getPrivateName() are no longer used internally
and are deprecated.

Pyrus Install

Download

- Fixed #2576: calling HTML_QuickForm::getSubmitValue() on a group
of radio elements caused an infinite loop with PHP eventually
dying of memory exhaustion. This was introduced in 3.2.4 in a
fix for bug #2517, those upgrading from earlier releases should
skip 3.2.4, those running 3.2.4 should upgrade ASAP.

- Fixed #2571: selects after the second were not correctly
populated in hierselect with 3 or more elements.

Pyrus Install

Download

* Additions and changes
- Implemented a new 'xbutton' element for HTML 4.0 <button> tag
(see also #1227)
- HTML_QuickForm::toArray() method accepts a boolean value that is
passed to the constructor of HTML_QuickForm_Renderer_Array (see #1392)
- ITDynamic renderer is now able to select a block for rendering based
on the element's name (see #1506)
- Default template of Default Renderer now allows XHTML-compliant output
of hidden elements (see #1124)
- Added Esperanto translation and French accents for date element
(Sebastien Montagne)
- Implemented #553: ITStatic renderer can use special blocks for required
elements and errors, if present in the template
- Implemented #1576: Enclose js code between //<![CDATA[ and //]]>
to make it xhtml compliant

Pyrus Install

Download

* On XHTML compliance:
As of 3.2.2 QuickForm does not rely on presence of 'name' attribute
in form tag (which is invalid in Strict XHTML), although it does
set this attribute. If you desire Strict XHTML compliance, you can
remove the attribute via removeAttribute() method.

* On Flexy renderers:
The Flexy renderers currently lack a maintainer. If one is not
found, they will be marked as unsupported and may later be removed
from the package. If you wish to look after these renderers, please
contact the package maintainers.

Pyrus Install

Download

* Major changes in this release
Refactored form validation using Strategy/Factory/Singleton patterns. Rules are now
processed by subclasses of HTML_QuickForm_Rule class, HTML_QuickForm_RuleRegistry manages
registering the rules and instantiating the rule classes. Backwards compatibility was
completely preserved. (Bertrand Mansion)
- Added ability to set a rule on several elements. Added 'compare' rule that compares the
values of two form elements to take advantage of this. (Alexey Borzov)
- New 'callback' rule and an improved 'email' rule.
- Function-based rules can now be used without registering.
- Added 2 new examples for built-in and custom rules. (Alexey Borzov)
- Javascript validation opportunities were enhanced, validation of groups, radios, checkboxes,
selects now works correctly (see also PEAR bug #184) (Alexey Borzov, Hodicska Gergely)

Pyrus Install

Download

* New additions
- Added a new hierselect element, a group of two selects where the first select changes the options of the second select using javascript (Bertrand Mansion)
- Added exportValue() and exportValues() methods, these should now be the preferred way to get form values (Alexey Borzov)
- Added addFormRule() method, this adds the rule that validates the whole form (Alexey Borzov)
- Added Italian date/dategroup names (Marco Piarulli)
- Added Slovak date/dategroup names (Peter Sablica)
- Added Icelandic date/dategroup names (Birgir Stefansson)

Deprecated methods will be removed from QuickForm in the next release.
In this release, they throw PEAR errors but still finish the job.
Use this to catch them with an error handler function, the global error code is QUICKFORM_DEPRECATED.

Pyrus Install

Download

- do not use submit values for 'submit' elements also (reported by Thomas Schulz, Mike Carter)
- assorted small fixes to HTML_QuickForm's methods and PHPDoc documentation
- HTML_QuickForm::apiVersion() returns 3.0 now

Download

- Fixed bug with selected values in select element
- Fixed bug when form method was changed from get to post by adding a file element
- addRule() and addGroupRule() now return a PEAR error when the rule is not registered
- <label> tags are no more generated for frozen checkboxes and radios

Download

- Renderers
QuickForm now uses external renderers to output the form. Currently
available renderers are: Default - based on old toHtml() code,
Array - based on old toArray() code, ITStatic and ITDynamic - these work
through an ITX/Sigma template engine. More renderers are expected to follow.
- Validation
Validation rules are tested in the order they are set. Groups can
now be validated with custom functions. File validation only happens
if a file is required. It is also tested if the file has been uploaded.
- Static elements
Headers and Data (html) elements are treated like other form elements.
Headers can have a name, this makes it possible to use different templates
for different headers.
- XHTML
HTML_Common and QuickForm have been reworked to be more XHTML compliant.

* Migration to 3.0

Incompatibilities:

- Filters registration is not used anymore. Just give applyFilter() the function name as a parameter.
- toArray() 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 onQuickFormEvent() with 'setDefault' and 'setConstant' events won't work anymore, these events have been replaced by an 'updateValue' event.
- Grouped elements index is now a numeric key only. This can break some group rules if you used their associative key in addGroupRule().
- Groups must have a name. If you don't want the name to be appended to the elements names, set the appendName parameter to false.

Deprecated features:
- addHeader() and addData(), while still there, are deprecated. Use addElement('header') and addElement('html').
- If you want to customize form output, do so by using a renderer object. setElementTemplate() and the like are now deprecated.

* Changes

- Added support for external renderers, added a default and an array renderer based on old QuickForm 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 addRule() (Bertrand Mansion)
- Added possibility to validate groups when appendName 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)

- addHeader() and addData() now call addElement(), added new 'header' and 'html' elements (Alexey Borzov)
- Got rid of registering filters, now only function existence is checked. First parameter to applyFilter can be an array (Alexey Borzov)
- Automatically generate a name for group element when no name given. Added possibility to append the group name or not to grouped elements (Alexey Borzov)
- process() now accepts a callback function to process the form (Bertrand Mansion)

- Elements values are now set through a uniform 'updateValue' event (Alexey Borzov)
- Elements with value 0 are not considered empty when validating (Bertrand Mansion)
- Fix warning with uploaded files (Frederic Poeydomenge)
- Changed _findElementValue to work with appendName (Bertrand Mansion)

This is probably the last release of QuickForm without template support.
The next release will have two BC breaks:
- Use of filters will be easier, no registration needed.
- Groups with no name will not be supported anymore, even if name is not used.

Pyrus Install

Download

* Added htmlspecialchars() to frozen elements output in every case.
* Elements are not validated against a function if they are empty and not required.
It is easier this way for QuickForm to work with external validators.
This is already the way it is done when using regex validation.
* Added javascript validation for select multiple and checkboxes.
* Added simple javascript validation for groups: values are imploded in a string.

Pyrus Install

Download

* Use moveUploadedFile() (PHP 4.1) for file uploads instead of copy() and unlink(). (Matthias Englert)
* Added support for element names with brackets ie. element[name][firstname].
* Added static element to add static text in form. (Wojciech Gdela)
* Removed extra tabs created when wrapping form elements (Tim Glen)
* Added validation for whole group with addRule('group') in complement to validation for group elements with addGroupRule('group').
* Added ability to use a method from a class or from an object for validation using registerRule().
* Fixed bug with radio button validation. (Jack Kline)
* Fixed bug when validating checkboxes named with backets ie. checkbox[A]
* Fixed a problem with stripslashes() in element.php
* Fixed a bug in hidden.php preventing its value to be set under some conditions. (Arne Gellhaus)
* In progress : fix bug with toArray() for the date element, use a layout object (templates), implement function validation for elements in group.

Pyrus Install

Download

* Refine the use of setDefaults and setContants.
setDefaults is used to fill the form with defaults values that will be overriden by submitted values once the form is submitted.
setConstants is used to overide default and submitted values for example if form is not valid when submitted. In this case, constant values will be shown again in the field.
In all cases, values won't be overriden by the other method anymore.
* Added grouped elements validation on the server-side.
* Added grouped elements customization through templates.
* Fixes in rules for file uploads on maxsize, mime... when element is not required.
* Added a new example for groups customization and validation.

Pyrus Install

Download

* Use $_POST, $_GET and $_FILES instead of $HTTP_.
* Better error checking in renderElement().
* Fixed freeze() for removed elements.
* Added new element 'hiddenselect'.
* Added optional $in_data parameter to method toHtml so that data can be added to the form right before it is rendered. Useful when using with a template system.
* Changed the way the key is obtained for _elementIndex in addElement() to accomodate with removeElement().
* Some changes to _buildRules(): Made some of the javascript variables private which did not need have a global scope (such as frm).
* Added new rule: emailorblank.
* Fixes in HTML_QuickForm_Element.
* Fixes in QuickForm_example2.php.
* Added getElements() in HTML_QuickForm_Group which returns an array of all elements in group by reference.
* Added getGroupType() in HTML_QuickForm_Group which returns the type of group as string or 'mixed' if group is composed of different element types.
* Fixes in file upload validation rules.
* Added a few new examples for filters, rules, file uploads usage.

Pyrus Install

Download

* Important API change in the way select elements load arrays.
* Added the possibility to set a template for an element only.
* Fixes in the creation of select elements with multiple attribute.
* Added consistency in the magic_quotes handling.
* Added recursive filters on setDefaults an setConstants values.
* Added getSubmitValue (same as getSubmitValues but for one value only).
* Removed HTML_QuickForm_date element: it needs more work.
* Added the HTML_QuickForm_advcheckbox element in package and in registered elements.
* Added one example for the HTML_QuickForm_advcheckbox element.
* Added setPersistantFreeze accessor method in element.php.
* Fixed problems with password field values.

Pyrus Install

Download

New API for new version 2.0 !
Here is a list of what's new in this version:
* Moved all the elements from HTML/QuickForm/Elements/ to HTML/QuickForm/
* Added $_elementIndex to keep track of the elements
* Changed $_elementValues to $_defaultValues
* Removed $_hidden and $_frozen
* Added Filter support
* Added templates for the _wrap functions
* Changed loadDefault() to setDefaults()
* Moved most of the logic to the element classes
* Created an abstraction between the form class and the elements
* Added getElement() and getElementValue()
* Added toArray()
* Cleaned up a lot of the code
* Added the // {{{ markers to all files to make it for easier reading in vim
* Added the error handlers and codes to make errors more descriptive
* Added new method setConstants() which is like setDefaults() except that it overrides the POST or GET variables.
* Added methods setElementTemplate(), setFormTemplate(), setHeaderTemplate() and setRequiredNotTemplate(). They are pretty self-explanatory.
* Added method addData(). Same as before.
* Added new method clearAllTemplates() which basically strips out all HTML. This is useful if you want to create a completely custom looking form using addData()
* Fixed the toHtml() method so that it is a while statement so that freeze() works.
* Fixed a bug in the hidden type, where it was setting the value when you created the element, thus not allowing the value to be set by POST or GET variables.
* Took out the is_int test in select.php.
* Made the caller a global variable in element.php, so that it can be accessed, if need be, in other element classes.
* Changed it so that if an element is frozen and has no value it outputs '' instead of nothing which messes up old browsers like NS4.
* Added renderElement() method which will return the html for one element.
* Added removeElement() method which removes the element from the elements list. Both methods accept parameters.