This fork focuses on code modernization, performance and quality of life improvements.
Add as dependency to your composer.json
file with:
composer require mistralys/html_quickform2
Also see the Packagist page.
Some changes in detail:
set/getRuntimeProperty()
method to store data at runtimesetValues()
method setRows()
/ setColumns()
methodsmakeOptional()
method to remove any required ruleshasErrors()
method to check if an element has errors after validationgetRules()
method to retrieve all rules added to the elementhasRules()
method to check if an element has any rulesaddRuleXXX()
shorthand methods, including addRuleRequired()
.appendComment()
method to append text to an existing comment.setComment()
extended to allow Stringable
values.isFrozen()
method to check if an element is frozen.requireElementById()
with non-null return value.addFilterTrim()
method. prependOption()
method to insert an element at the top.getLabel()
method.countOptions()
method with recursive capability.makeMultiple()
and isMultiple()
.setSize()
and getSize()
.getSelectedOption()
.setLabel()
method where relevant.setChecked()
method.setURL()
method.makeSubmit()
and makeButton()
.getMethod()
.makeMultiPart()
and isMultiPart()
.getCallback()
to retrieve the configured callback.setDefaultMessage()
to the required rule.createArray()
and createCallback()
.getElementById()
method.The element ID generation mechanism has been modified, so it is no longer possible to rely on a specific naming scheme to predict the automatic element IDs. In practice, this was impractical at best anyway, and the new system has big performance gains.
See the main branch for details and documentation: https://github.com/pear/HTML_QuickForm2
Additional documentation is available in the docs/knowledgebase folder, in the form of Markdown files.