S L
S L

Reputation: 14318

how to add a (element) tag after each form element in zend framework?

I would like to add h tag after a group of elements so that i can put them sectionwise in zend form. Please help me! I want to create like

section1
    element1
    element2
section2
    element3
    element4

and i want to replace section by h tag

Upvotes: 0

Views: 832

Answers (1)

Adam
Adam

Reputation: 873

You can add hidden element with label and set escape=>false in decorator

 $html = new Zend_Form_Element_Hidden('html');
        $html->setLabel('<div id="some-id">lorem ippsum</div>')
             ->setIgnore(true)
             ->addDecorator('Label', array('escape' => false));

Upvotes: 1

Related Questions