|
|||
|
Hi everyone,
I'm creating a form and I just can't find how to give a <label> tag an id using zend_form. ->setAttrib('id', 'agreement-box') worked fine for the checkbox, but I couldn't do ->setAttrib('id', 'agreement-label') since the label is considered a decorator it seems. Here is what I want: HTML Code:
<input class="checkbox" name="agreement-box" id="agreement-box" type="checkbox" /> <label id="agreement-label">I have read and agree to the <a href="#">Terms of Use</a> and <a href="#">Private Policy</a></label> PHP Code:
here's zend's html output: HTML Code:
<input type="checkbox" name="agreementbox" id="agreement-box" value="1"> <label for="agreement-box" class="required">I have read and agree to the<a href="#"> Terms of Use</a> and <a href="#">Private Policy</a>:</label> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|