I am developing a zendframework project. My sign up page contains a field “I Agree to the Terms of Use” with a check box near to it. Here I want to make “Terms of use” as a link. But I am new to the zend and PHP5. I checked the code and below is the code to display “I Agree to the Terms of Use”
'Agree' => array ('Checkbox', array (
'Required' => true,
'Decorators' => $element Decorators,
'Label' => 'I Agree to the Terms of Use',
)),
How I would make Terms of Use as a link?
You can add HTML to the label if you have your label decorator set up correctly. First, add
'escape' => falseto the options of your label decorator. Without seeing your exact decorators it is difficult to say exactly how it should look for you, but it is likely to look like this:Then, add the HTML anchor to your label:
Be wary of placing links on labels though. A label’s native click action is to bring focus to the input it is associated with. If you have problems with this, you can apply the same options to a
Descriptiondecorator and add the link there.