PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #1728

Include a name placeholder for ITDynamic

Details

Request #1728Include a name placeholder for ITDynamic
Submitted2004-06-27 17:06 UTC
Fromjellybob at php dot net
StatusWont fix
PackageHTML_QuickForm
PHP Version5.0.0RC3 (Release Candidate 3)
OSN/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;