activeTextField and array

hey…

i'm have a little problem building a formarray and resolving it afterwards.

i have a db-table with a t5kw field in it. i want to collect 5 words from separated textfields and combine them later, using implode()

i tryed this:

        <div class="simple">


        <?php echo CHtml::activeLabelEx($basis,'t5kw'); ?>


        </div>


        <div class="simple">


        <?php echo CHtml::activeTextField($basis,'t5kw[1]'); ?>


        </div>


        <div class="simple">


        <?php echo CHtml::activeTextField($basis,'t5kw[2]'); ?>


        </div>


        <div class="simple">


        <?php echo CHtml::activeTextField($basis,'t5kw[3]'); ?>


        </div>


        <div class="simple">


        <?php echo CHtml::activeTextField($basis,'t5kw[4]'); ?>


        </div>


        <div class="simple">


        <?php echo CHtml::activeTextField($basis,'t5kw[5]'); ?>


        </div>


and later



$basis->t5kw=implode(', ',$basis->t5kw);


its not working

can anyone tell me how to do it right?

Did you read this? http://www.yiiframew…uide/form.table

yeah i did read this but either its not what im looking for or i dont know how to use it in this case

Try this:



echo CHtml::activeTextField($basis,'t5kw',array('name'=>'ClassName[t5kw][0]'));


echo CHtml::activeTextField($basis,'t5kw',array('name'=>'ClassName[t5kw][1]'));


...