Zend adding an (x)HTML element

By.

min read

My profile

Share this:

Do not use the formNote helper for a text element as this will show a NULL element (value) when submitted.

Use this:

[code:1:87a89b8bb1] $this->addElement(’hidden’, ‘plaintext’, array(
‘description’ => ‘Hello world! <a href=”#”>Check it out</a>’,
‘ignore’ => true,
‘decorators’ => array(
array(’Description’, array(’escape’=>false, ‘tag’=>”)),
),
)); [/code:1:87a89b8bb1]

Source: http://stackoverflow.com/a/11448694/696680

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *