Hi,
I dont use php for that.
In my project a nned to set background color as value of options so just
after generated form i write some jquery code:
$(document).ready(function(){
$('#select option').each(function(i) {
$(this).css('background-color', $(this).attr('label'));
});
});
PHPScriptor wrote:
>
>
> Hello there,
>
> I think it's not possible to do with Zend Forms, but can anyone give me
> some advice how I could do it the best way. Something like: making the
> Zend Form and output it step by step in the view?
>
> I want to set every option in my select a different background-color...
>
> <select ...>
> <option style="background-color:green" value="B"
> title="B"> </option>
> <option style="background-color:red" value="A"
> title="A"> </option>
> <option style="background-color:blue" value="C" title="C"
> > </option>
> </select>
>
>
>
--
View this message in context:
http://www.nabble.com/Zend_Form---select---option-bgcolour-tp22073845p25525955.html
Sent from the Zend Framework mailing list archive at Nabble.com.