| Jeremiah Mattison 2007-09-24, 10:06 pm |
| So I'm trying to pass the contents of an element back to the form as a
hidden element to do some checking to see if the content had changed
before doing validation. The problem is it just keeps passing the
original value of that post var (if any) even though I can dump the var
contents and see that it has changed right before the QF code. I can
pass a manually coded hidden element just fine. Here is a basic example:
---
print_r($_REQUEST);
$form = new HTML_QuickForm('frmTest');
$form->addElement('text', 'test', 'Test:');
$form->addElement('hidden', 'lasttest', $_REQUEST['test']);
$form->addElement('hidden', 'manual', 'manual');
$form->addElement('submit', 'btnSubmit', 'Submit');
$form->display();
---
If I enter "one" the first time I get this:
Array
(
[lasttest] =>
[manual] => manual
[test] => one
[btnSubmit] => Submit
)
If I enter "two" this time I get this:
Array
(
[lasttest] =>
[manual] => manual
[test] => two
[btnSubmit] => Submit
)
.... Am I just completely missing something here? Thanks.
|