help with form in list


I am using the view list to display records.

On the list, I need the user to enter qty and when submit is pressed, got o the controller and process.

I did this easy in Codeigniter, but find it harder in yii as I am still learning.

Does anyone have an example?

I want them to be able to enter a qty and click buy.

Not sure of the form syntax in yii?

Got this working.

<?php echo CHtml::beginForm($this->createUrl('/Shopinventory/buy')); ?>

				<div class="row submit">

					<?php echo CHtml::HiddenField('id',$data->Item) ?>

					<?php echo CHtml::Label('Qty','qty'); ?>

					<?php echo CHtml::TextField('qty') ?>

					<?php echo CHtml::submitButton('Add to Cart'); ?>


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