I'm trying to remove the default decorators on a hidden form element. By default, the hidden element is displayed like this:
<dt>Hidden Element Label (if I had set one)</dt>
<dd><input type="hidden" name="foobar" value="1" id="foobar"></dd>
I don't want my hidden element to take up space on my page. I want to remove all the default decorators so all I'm left with is the input tag.
<input type="hidden" name="foobar" value="1" id="foobar">
How can I achieve this?
// based on above - a simple function to add a hidden element to $this form
here is what takeme2web from http://www.phpfreaks.com/forums/index.php?topic=225848.0 suggests
$yourhiddenzendformelement->setDecorators(array('ViewHelper'));
I use this
to get rid of the dt dd tags around specific elements
As mentioned in other posts
setDisableLoadDefaultDecorators(true)
doesn't work if they're already loaded... BUTclearDecorators()
does!When you have a lot of hidden inputs best answer is the following:
Use this: