Home » HTML » HTML_QuickForm » Bug #1728
Include a name placeholder for ITDynamic
Details
| Request #1728 | Include a name placeholder for ITDynamic |
|---|---|
| Submitted | 2004-06-27 17:06 UTC |
| From | jellybob at php dot net |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | 5.0.0RC3 (Release Candidate 3) |
| OS | N/A |
| Roadmaps | (Not assigned) |
Comments
[2004-06-27 17:06 UTC] jellybob at php dot net
Description:
------------
I have added the ability to include a {qf_name} placeholder in a form template, specifically for use with label elements (<label for="{qf_name"}>{qf_label}</label>).
Reproduce code:
---------------
--- ITDynamic-cvs.php 2004-06-27 18:02:00.897226016 +0100
+++ ITDynamic.php 2004-06-27 18:03:20.507123472 +0100
@@ -146,6 +146,12 @@
$this->_errors[] = $error;
}
}
+
+ // Render the name if a placeholder has been set for it.
+ if ($this->_tpl->placeHolderExists('qf_name', $blockName)) {
+ $this->_tpl->setVariable('qf_name', $element->getName());
+ }
+
// show an '*' near the required element
if ($required) {
$this->_showRequired = true;