I have a form made by Zend Framework that needs a submit button. I want to place an image instead of the default button. The code I have is this:
$submit = new Zend_Form_Element_Submit( 'submit');
However, I can not add an image for the submit button here. If I create the form with the following code, it works:
$this->addElement('image', 'submit', array(
'ignore' => true,
'label'=>'Submit',
'src' => ('/media/css/image/submit.png'),
));
How can I add image instead of the default submit button in the first approach of form creation?
1 Answer