Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #925 form name attribute does not exist in xhtml1.1
Submitted: 2004-02-28 20:44 UTC
From: inside at parasiterecords dot com Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2004-02-28 20:44 UTC] inside at parasiterecords dot com
Description: ------------ This is what I get when validating my xhtml1.1 document : <form action="/test2.php" method="post" name="myForm" id="myForm"> Error: there is no attribute name for this element (in this HTML version) The form attributes are generated in the HTML/QuickForm.php file like this : $attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target; Reproduce code: --------------- require_once "HTML/QuickForm.php"; $form = new HTML_QuickForm('myForm'); $form->addElement('text', 'name', 'Nom : '); $form->addElement('submit', 'btnSubmit', 'Submit'); if ($form->validate()) { $form->freeze(); } $form->display(); Expected result: ---------------- <form action="/test2.php" method="post" id="myForm"> Actual result: -------------- <form action="/test2.php" method="post" name="myForm" id="myForm">

Comments

 [2004-02-29 08:45 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-02-29 10:18 UTC] mansion at php dot net
We could also add a name property to the form object, instead of the attribute and use getName() instead of getAttribute('name'). If the developer wants a name attribute in his <form> tag, he should be free to do so using updateAttributes(), as he might be using some old javascript code relying on this. I think this way we don't need to change accept(). But we will have to find every places where getAttribute('name') is called.
 [2004-02-29 12:11 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-02-29 12:13 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-03-01 20:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-03-02 21:10 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!