+ Reply to Thread
Results 1 to 2 of 2

Thread: How to write html in a form element's label

  1. #1
    scilingir is offline Junior Member
    Join Date
    Mar 2010
    Posts
    1

    Default How to write html in a form element's label

    Hi people,

    I have a small question about Zend Forms and if you could help, I'd appreciate it.
    I want to be able to write html in an element label. (For ex. just an anchor)
    You have any idea how to do that?

    Thanks in advance.

  2. #2
    alokin is offline Senior Member
    Join Date
    Apr 2009
    Posts
    192

    Default

    When setting label as decorator for some of your element, supply option "escape" parametar, with false value, for example:
    Code:
    $yourElement->addDecorator('Label', аrray('escape'=>false));
    Then you can put some HTML in your label and tags won't be escaped.

+ Reply to Thread

Similar Threads

  1. How to add a Zend_Form_Element label as html code
    By gavkuk in forum Core Infrastructure
    Replies: 2
    Last Post: 03-28-2010, 02:14 AM
  2. Zend_Form combine label and element
    By Gate in forum Core Infrastructure
    Replies: 1
    Last Post: 09-20-2009, 02:44 PM
  3. Wrapping form element AND label in a tag with decorators?
    By sosh in forum General Q&A on Zend Framework
    Replies: 6
    Last Post: 05-08-2009, 07:57 AM
  4. Form element and its Label Alignment ?
    By nandana in forum General Q&A on Zend Framework
    Replies: 2
    Last Post: 03-11-2009, 08:52 PM
  5. Zend_Form - Get element without Label?
    By WildFoxMedia in forum General Q&A on Zend Framework
    Replies: 1
    Last Post: 01-25-2009, 09:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts