Home » HTML » HTML_QuickForm_Controller » Bug #1866
Back action and client side rule
Details
| Submitted | 2004-07-13 21:38 UTC |
|---|---|
| From | milos at mcservices dot com |
| Status | Wont fix |
| Package | HTML_QuickForm_Controller |
| PHP Version | Irrelevant |
| OS | Any |
| Roadmaps | (Not assigned) |
Comments
[2004-07-13 21:38 UTC] milos at mcservices dot com
Description:
------------
In documentation is written for "back" action:
"As of QFC 0.9.3, no form validation takes place on 'back' action. "
This is true, BUT ONLY if you dont use client side verification!
This might be the problem from HTML_QuickForm too, but HTML_QuickForm_Controller should overrid this.
This is true for HTML_QuickForm_Controller 1.0.2 and
HTML_QuickForm 3.2.3
Reproduce code:
---------------
//Add this to your form:
//----------------------------
$this->addElement('text', 'category', 'Category:', array('size' => 36, 'maxlength' => 50));
$this->addRule('category', 'Category is required', 'required', null, 'client');
$buttons[0] =& HTML_QuickForm::createElement('submit', $this->getButtonName('back'), '<< Back');
$this->addGroup($buttons, 'buttons', '', ' ', false);
//--------------------------------------
//And your form wizard will never go Back
Expected result:
----------------
When you click on Back button to go Back
Actual result:
--------------
Validation error message.