frocco
(Farocco)
1
Hello,
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?
frocco
(Farocco)
2
I want them to be able to enter a qty and click buy.
Not sure of the form syntax in yii?
frocco
(Farocco)
3
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'); ?>
</div>
<?php echo CHtml::endForm(); ?>