HTML_QuickForm_DHTMLRulesTableless is a DHTML replacement for the standard JavaScript alert window for client-side validation of forms built with HTML_QuickForm when using the HTML_QuickForm_Renderer_Tableless renderer.
In addition to the standard behaviour of HTML_QuickForm (i.e. showing the errors from client-side validation on the "onSubmit" event), this package can also show the errors on the "onBlur" and "onChange" events (see below for information on how to enable this).
To use this package you just need to do something like this:
require_once 'HTML/QuickForm.php'; require_once 'HTML/QuickForm/DHTMLRulesTableless.php'; require_once 'HTML/QuickForm/Renderer/Tableless.php'; $form = new HTML_QuickForm_DHTMLRulesTableless(...); $renderer = new HTML_QuickForm_Renderer_Tableless(); // usual code, e.g. new form fields, rules, ... $form->accept($renderer); echo $renderer->toHtml(); |
$form->removeAttribute('name'); |
$form->getValidationScript(); |
Пред. | Начало | След. |
HTML_QuickForm_Renderer_Tableless | Уровень выше | HTML_Table |
HIVE: All information for read only. Please respect copyright! |