2008年8月1日星期五

[fw-mvc] Zend_Form:Add image to radio buttons

Hi there,

Here's my code:
$background = new Zend_Form_Element_Radio('background');
$background->setLabel('Background image:');
$background->setMultiOptions(array(
1 => ' /images/1.jpg '
));
The output is:

<label for="background" class="optional">Background image:</label>
<dd>
<label style="white-space: nowrap;">
<input type="radio" name="background" value="1" />&lt;img
src=&quot;/images/1.jpg&quot;&gt;
</label>
</dd>

But I want this:

<label for="background" class="optional">Background image:</label>
<dd>
<label style="white-space: nowrap;">
<input type="radio" name="background" value="1" />' /images/1.jpg
</label>
</dd>


Is it possible in Zend_Form without creating a custom decorator?

Thanks for your help
--
View this message in context: http://www.nabble.com/Zend_Form%3AAdd-image-to-radio-buttons-tp18778620p18778620.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: