PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #3896

value for hidden element when passing with request

Details

Submitted2005-03-21 12:55 UTC
Frommarcin dot krzyzanowski at gmail dot com
StatusBogus
PackageHTML_QuickForm
PHP Version5.0.2
OSMacOS
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"