Question

I'm using the Zend_Form_Element_Image on my Zend Form. This outputs :

<input id="media_img" type="image" src="/img/bigbtn-add.png" name="media_img">

What do think about that type="image" writing ? Do you prefer the "img" tag instead ?

If yes, someone stacked this solution to render an "img" element : see here

Is it the only way to render a classic "img" tag on Zend 1.12 ?

Thanks.

Was it helpful?

Solution

The input with type image is actually a submit button that uses an image. See here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input

It's not the same as an img tag.

So depends on what you want to render.

In general, I think it's a bit easier to work with Zend_Form_Decorator_View_Script since you have better control of your HTML. See here: http://framework.zend.com/manual/1.12/en/zend.form.standardDecorators.html#zend.form.standardDecorators.viewScript

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top