I create a hidden element that way:
$this->addElement('hidden', 'id', '1');
but what I get is this:
<input type="hidden" name="id" value="" id="id" />
I’ve also tried like this:
$this->addElement('hidden', 'id', array(
'value' => 1
));
but it didn’t work better.
What’s wrong?
You might be using
or
somewhere in your code 😉