dropDownList value template

Hi people,

I want to put a text with all the values of a dropdownlist.

The query returns the values (1, 2, 3, 4, 5).

This values will by fill a dropdownlist.

But i wanna put a text with the values. By example: "5 dias", instead of just "5".

Somebody knows how i can do this?

Thanks.

SOmebody?

Here is your answer. Just read it and you’ll get good directions for problem solving.

http://www.yiiframework.com/forum/index.php?/topic/24474-showing-different-value-instead-of-values-returned-form-column/page__view__findpost__p__118598

We, that’s a good way to solve it.

But before i try it, i wanna know if haven’t a attribute in htmlOptions of the dropDownList, to solve this.

In Cmenu, exists the "template" propertie. In dropDownList have something like this?

Thanks.

Sorry, but I don’t understand your question…

Read the documentation http://www.yiiframework.com/doc/api/1.1/CHtml#dropDownList-detail for available options.