Home » HTML » HTML_QuickForm » Bug #6223
Space in form name breaks trackSubmit
Details
| Submitted | 2005-12-11 16:53 UTC |
|---|---|
| From | schapht at verizon dot net |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | 5.0.4 |
| OS | Mac OS 10.4.3 |
| Roadmaps | (Not assigned) |
Comments
[2005-12-11 16:53 UTC] schapht at verizon dot net
Description:
------------
If a form with trackSubmit enabled has a space in the form name, it no longer recognizes itself on validate().
The problem seems to be that PHP converts spaces in POST/GET variable names to underscores.
I can't find anything about a php.ini setting on this. It seems like QuickForm should either (a) convert spaces in internal names to underscores or (b) throw errors when attempting to add names that contain spaces.
The same problem exists for elements with spaces in their names. exportValue no longer works because the the $_REQUEST name has an underscore in it.
Test script:
---------------
addElement('submit', 'submit', 'Submit');
if ($form->validate()) {
echo "validated";
}
?>
toHtml(); ?>
Expected result:
----------------
(after submission)
validated
Actual result:
--------------
(after submission)
</form></body></html>