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

Bug #12026 {error} placeholder, dpesnt return right value
Submitted: 2007-09-11 15:14 UTC
From: rastafari Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.9)
PHP Version: 5.1.6 OS: FC 6
Roadmaps: 3.2.10    
Subscription  


 [2007-09-11 15:14 UTC] rastafari (Ras Tafari)
Description: ------------ After calling function setElementTemplate, the placeholder for error is visible in form, before validating. Just as I wrote into phpcode "{error}" . Works normal in 3.2.7 version, after upgrade doesn't work properly. Test script: --------------- $form = new HTML_QuickForm('form','POST','/'); $renderer =& $form->defaultRenderer (); $renderer->setFormTemplate ("<fieldset><legend>Form</legend><form{attributes}>\n<table>{content}</table>\n</form></fieldset>"); $renderer->setRequiredNoteTemplate ('{requiredNote}'); $renderer->setElementTemplate ( '<tr><td colspan="2"><!-- BEGIN error --><span style="color:red;font-weight:bold;">{error}</span><!-- END error --></td></tr>'. '<tr>'. '<td><!-- BEGIN required --> <b>*</b> <!-- END required -->'.'{label}</td>'. '<td>{element}</td></tr>'."\n" ); $form->setRequiredNote ('<tr><td><span class="mandatory">* Required</span></td></tr>'); Expected result: ---------------- Simply skinned form with not visible {error} placeholder before validation. Actual result: -------------- Simply skinned form with visible "{error}" placeholder before validation.

Comments

 [2007-09-16 18:50 UTC] avb (Alexey Borzov)
Oops, looks like a by-product of fixing bug #9977. 's' modifier should be added to several regexps in Default Renderer.
 [2007-10-05 10:03 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.