Home » HTML » HTML_QuickForm » Bug #3896
value for hidden element when passing with request
Details
| Submitted | 2005-03-21 12:55 UTC |
|---|---|
| From | marcin dot krzyzanowski at gmail dot com |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 5.0.2 |
| OS | MacOS |
| Roadmaps | (Not assigned) |
Comments
[2005-03-21 12:55 UTC] marcin dot krzyzanowski at gmail dot com
Description:
------------
value for hidden element when passing with request is
not changed, print with "request" value instead new one.
Reproduce code:
---------------
<?php
$form = new
HTML_QuickForm('aForm',"post","","_self","");
if (!isset($_REQUEST["page"]) || ($_REQUEST["page"] ==
1))
{
$form->addElement('hidden','page','2','');
$form->addElement('submit', null, 'NextPage');
$form->display();
} else if ($_REQUEST["page"] == 2) {
$form->addElement('hidden','page','3',''); //but it
print value '2' as it is in $_REQUEST["page"], and no
way to change it
$form->addElement('submit', null, 'NextPage');
$form->display();
} else if ($_REQUEST["page"] == 3) {
print "This will never show, because 'page' value is
still '2' instead '3';
}
?>
Expected result:
----------------
hidden "page" should be first "2" and after should be
"3"
Actual result:
--------------
it still display "2"