Home » HTML » HTML_QuickForm » Bug #5144
Static elements with default values
Details
| Submitted | 2005-08-18 18:14 UTC |
|---|---|
| From | kapcsolat at edgarpe dot hu |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 4.3.11 |
| OS | win2003 |
| Roadmaps | (Not assigned) |
Comments
[2005-08-18 18:14 UTC] kapcsolat at edgarpe dot hu
Description:
------------
Static element values can't be reached when process funcntion is used.
Test script:
---------------
require_once('HTML/QuickForm.php');
$form = new HTML_QuickForm;
$form->addElement('static', 'tpl_static', 'Template');
$form_defaults['tpl_static'] = 'salalala';
$form->setDefaults($form_defaults);
$form->addElement('submit', 'submit', 'submit');
$form->display();
if ( $form->validate() )
{
$form->process('doProcess');
}
function doProcess($formValues)
{
var_dump($formValues);
}
Expected result:
----------------
Output should be:
array(2) {
["tpl_static"]=> string(8) "salalala"
["submit"]=> string(6) "submit"
}
Actual result:
--------------
Actual output is:
array(1) {
["submit"]=> string(6) "submit"
}