Home » HTML » HTML_QuickForm_Controller » Bug #6453
Page class assuming action to be empty
Details
| Request #6453 | Page class assuming action to be empty |
|---|---|
| Submitted | 2006-01-10 09:52 UTC |
| From | alex dot griessel at za dot syspro dot com |
| Status | Wont fix |
| Package | HTML_QuickForm_Controller |
| PHP Version | 4.2.0 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-01-10 09:52 UTC] alex dot griessel at za dot syspro dot com
Description:
------------
Class should not assume the form action to be the script name without querystring parameters. As defined by line 61 of (HTML_QuickForm_Controller 1.0.5 stable)
Test script:
---------------
class TestPage extends HTML_QuickForm_Page {
function buildForm() {
this->_formBuilt = true;
$this->addElement('text','element1','Arbitary Element 1');
$this->addElement('submit', $this->getButtonName('next'), 'Next step >>');
$this->setDefaultAction('next');
}
}
class TestPage2 extends HTML_QuickForm_Page {
function buildForm() {
this->_formBuilt = true;
$this->addElement('text','element1','Arbitary Element 2');
$this->addElement('submit', $this->getButtonName('back'), '<< Previous step');
$this->addGroup($prevnext, 'buttons', '', ' ', false);
$this->setDefaultAction('next');
}
}
$page1 = new TestPage('page1','POST','?section=registration');
$page2 = new TestPage2('page2','POST','?section=registration');
Expected result:
----------------
A proxy script which takes care of loading a section of the site based on the "section" query string parameter cannot be assigned such a string eg action="?section=registration".
Actual result:
--------------
expected action string is assined to the target of the form
[2006-01-10 10:09 UTC] naonak at free dot fr
HTML_QuickForm_Page($formName, $method = 'post', $target = '', $attributes = null)
$page1 = new TestPage('testForm4, 'post', '', array('action'=>'index.php?section=registration'));
But it doesn't work too.
Get query is ignore!
How to pass a get query on the next page ?
It's very big problem!
[2006-01-10 20:17 UTC] alex dot griessel at za dot syspro dot com
Method is defined on line 61 of page class file (Page.php)