BATCH UPDATE (TABULAR INPUT )

I am newbie I want an example for batch update (such as example with blog creation, where we have single form with posts and profile creation and on submitting data goes to post and profile table). I went thru http://yiiframework.ru/doc/guide/en/form.table but couldnot make it out.

Thanks in advance.

The Yii 1.0.x tabular input format was different




<div class="yiiForm">

<?php echo CHtml::beginForm(); ?>

<table>

<tr><th>Name</th><th>Price</th><th>Count</th><th>Description</th></tr>

<?php foreach($items as $i=>$item): ?>

<tr>

<td><?php echo CHtml::activeTextField($item,"name[$i]"); ?></td>

<td><?php echo CHtml::activeTextField($item,"price[$i]"); ?></td>

<td><?php echo CHtml::activeTextField($item,"count[$i]"); ?></td>

<td><?php echo CHtml::activeTextArea($item,"description[$i]"); ?></td>

</tr>

<?php endforeach; ?>

</table>



/Tommy

Hi tommy, thanks for the fast reply.

I want a step by step procedure (roughly) with any example . Hope you will help me.

Thanks

What version of Yii are you using?

I’ll sign up for a step by step tutorial for 1.1 (preferably using CForm). The info on the Definitive Guide seems incomplete and incorrect and I can’t figure this out…

hi vince

im using yii 1.1.1

sorry for late reply.