checkboxlist with textfields


I am using checkboxlist to generate chechboxes from a values from a table. It is very convinient, and i really would like to avoid using other solutions (for instance a cilcle wich creates boxes for each value).

The problem is, i need a textfield next to each checkbox, to add values to the selected boxes.

Is there an elegant way to achieve this?

I am not sure if I understand what you mean, but if you want to add labels to your checkboxes you could use the htmloptions of the checkboxlist:

[extract]template: string, specifies how each checkbox is rendered. Defaults to "{input} {label}", where "{input}" will be replaced by the generated check box input tag while "{label}" will be replaced by the corresponding check box label.[/extract]

Mabe i wasnt clear enough. I want to have a text field next to each checkbox, like CActiveForm::textField. The problem is, listcheckbox generates the boxes automaticly, and i dont know if there is a way, to insert textFields between them.

i am starting to think, it is not possible to achieve this wit checkboxlist. Any other opinions?

I ended up using a html table, with a bunch of checkboxes created with foreach. Not too elegant, but it works. Thanks for your input!