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 #6223

Space in form name breaks trackSubmit

Details

Submitted2005-12-11 16:53 UTC
Fromschapht at verizon dot net
StatusWont fix
PackageHTML_QuickForm
PHP Version5.0.4
OSMac 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>