Attribute "for" in label tag with QuickForm and Renderer_ITDynamic
| From: | Pierre-Yves Stucki | Date: | Sat, 22 Oct 2005 08:31:02 +0000 |
| Subject: | Attribute "for" in label tag with QuickForm and Renderer_ITDynamic | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-21589@lists.php.net to get a copy of this message | ||
References: <72caf6432e6ba35e071a9e01fe206238@electroteque.org>
<d20e950d3730cc6598ef0314c4261d13@electroteque.org>
In-Reply-To: <d20e950d3730cc6598ef0314c4261d13@electroteque.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
I'm creating a form with QuickForm and Renderer_ITDynamic. Everything
works really fine, excepted one point : I can't find how to create the
"for" attribute in the "label" tag.
Basically, I create the element this way :
$form->addElement('text', 'post_commune', 'Commune :',
array('id'=>'post_commune'));
In my template, I place this :
<label>{qf_label}</label>
{qf_element}
And the resulting HTML output is :
<label>Commune :</label>
<input id="post_commune" name="post_commune" type="text" />
What should I add (in PHP or in template) in order to have the following
output :
<label for="post_commune">Commune :</label>
<input id="post_commune" name="post_commune" type="text" />
I couldn't fin any documentation on that point in PEAR manual or in
forums...
Many thanks for your help !
PY.