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

Bug #4262 HTML_Quickform does not print default attributes
Submitted: 2005-05-02 16:39 UTC
From: cipri Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-05-02 16:39 UTC] cipri
Description: ------------ I created a form with QF and specified that it should POST with a target of _self. As this page was placed in the Windows background/active desktop, it needs to have a target=_self attribute or it'll launch in a popup. Specifying the '_self' attribute in the QF Constructor did not work. I had to add it via the attributes argument or it would not work. Reproduce code: --------------- $ticketForm = new HTML_QuickForm('ticketForm', 'POST', $_SERVER['REQUEST_URI'], '_self'); Expected result: ---------------- <form target="_self" action="desktop.php" method="post" name="ticketForm" id="ticketForm"> Actual result: -------------- <form action="desktop.php" method="post" name="ticketForm" id="ticketForm">

Comments

 [2005-05-28 17:12 UTC] avb
Looks like there is a bad choice of default parameter value in HTML_QuickForm's constructor. Default for $target is '_self' and later such value is explicitly removed from attributes.
 [2005-06-13 13:30 UTC] avb
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.