2008年8月2日星期六

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

Found it

For the record:
$background = new Zend_Form_Element_Radio('background', array('escape' =>
false));


ZFRocks wrote:
>
> 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-tp18778620p18791137.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: