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

Bug #672 Forms tag incorrect and missing a bracket
Submitted: 2004-02-03 04:51 UTC
From: ddalton at shortbus dot net Assigned:
Status: Bogus Package: HTML_QuickForm
PHP Version: 4.3.4 OS: Windows
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 40 + 45 = ?

 
 [2004-02-03 04:51 UTC] ddalton at shortbus dot net
Description: ------------ Using the code below, the quick form generates a form tag missing a bracket : <form action="index.php?caseid=connect" method="post" name="connect" id="connect" <input name="ttmp" type="hidden" value="TEMP" /> <input name="rid" type="hidden" value="" /> <input name="cid" type="hidden" value="" /> <input name="mUserID" type="hidden" value="5" /> <input name="type" type="hidden" value="" /> <tr> <td align="right" valign="top"><b> Message </b></td> <td valign="top" align="left"><textarea cols="80" rows="10" wrap="virtual" name="message">Test</textarea></td> </tr> <tr> <td align="right" valign="top"><b>Do you want this to be a Global request</b></td> <td valign="top" align="left"><select setselected="0" name="mGlobal"> <option value="0">No</option> <option value="1">Yes</option> </select></td> </tr> <tr> <td align="right" valign="top"><b></b></td> <td valign="top" align="left"><input name="submit" value="Submit Message" type="submit" /></td> </tr> </form> Reproduce code: --------------- $form = new HTML_QuickForm('connect', 'post',$action="$srv?caseid=connect"); //***************** BUG IN QUICKFORMS // FOR SOME REASON THIS BROKE and the first line is needed to buffer an error with quickforms //if ttmp is removed RID wont post $form->addElement('hidden','ttmp','TEMP'); $form->addElement('hidden','rid',$rid); $form->addElement('hidden','cid',$cid); $form->addElement('hidden','mUserID',$mUserID) ; $form->addElement('hidden','type',$type ); $renderer =& $form->defaultRenderer(); $rtemp="\n<TABLE width=$maintablewidth class=boxborder align=$maintablealign border=0 ". "cellspacing=0 colspan=5 bgcolor=#FFFFFF nowrap>\n". "<form{attributes}{content}\n</form></table>\n"; $renderer->setFormTemplate($rtemp); $cmsg="Test"; $defaultValues = Array("message"=>$cmsg); $form->setDefaults($defaultValues); $form->addElement('textarea','message'," Message ",'cols="80" rows="10" wrap="virtual"'); $yesno=Array(0=>"No",1=>"Yes"); $setselect=Array("SetSelected"=>0); $form->addElement('select', 'mGlobal', 'Do you want this to be a Global request', $yesno, $setselect); $form->addElement('submit', 'submit', 'Submit Message'); Expected result: ---------------- To get the rid hidden field, but it doesnt post correctly on internet explorer 6.

Comments

 [2004-02-03 05:40 UTC] avb
There is no bracket in the form template you use ($rtemp), do you expect QuickForm to fix it for you?