문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top