Try this
$this->addElement('SubmitButton','submitBtn',array(
'required' => false,
'ignore' => true,
'label' => 'Submit',
'decorators'=>array( 'ViewHelper' )
));
I use this to set only one decorator for hidden form elements, you can
do similar to restrict what decorators you want for each element. The
above will only print
<input /> with all the attributes
Thanks
Naimesh.Trivedi (Gmail) wrote:
Hello !
I am using Zend framework 1.8.4. I tried adding a Zend_Form_dojo
button element as below :
$this->addElement('SubmitButton','submitBtn',array('required' =>
false,'ignore' => true,'label' => 'Submit',));
It adds it successfully but also generates <label> element for it
which is not required and not found in any web input form. It
generates following :
<tr><td id="submitBtn-label"><label for="submitBtn"
class="optional">Submit</label></td>
<td>
<input id="submitBtn" name="submitBtn" value="Submit" type="submit"
/></td></tr>
What don’t want is generation for <td> <label> for submit buttion
which looks awkward, please help me how to remove it.
Thanks & Regards,
Naimesh