Hey guys,
I’m kind of stuck with this issue, looked around forums for a while and really couldn’t find any good solutions for this…
Here is my code
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(
array(
'class'=>'CLinkColumn',
'header'=>'Product Name',
'labelExpression'=>'$data->product->product_name',
'urlExpression'=>'Yii::app()->createUrl("product/view", array("id"=>$data->id_product))',
),
array( //TextBox --- Displays quantity
'header'=>'Quantity',
'value'=>'CHTML::activeTextField($data,\'quantity\')',
'type'=>'raw',
'htmlOptions'=>array('width'=>'40px'),
),
array( //Update button - Doesn't work - nothing in post..
'value'=>'CHTML::button(\'Update\', array(\'submit\' => Yii::app()->createUrl("cart/update", array("id"=>$data->id_product))))',
'type'=>'raw',
'htmlOptions'=>array('width'=>'40px'),
),
array( //Remove button - Works just fine
'value'=>'CHTML::button(\'Remove\', array(\'submit\' => Yii::app()->createUrl("cart/remove", array("id"=>$data->id_product))))',
'type'=>'raw',
'htmlOptions'=>array('width'=>'40px'),
),
),
)); ?>
Here is what i’m trying to do
When you hit update button it takes you to the right page, but my $_POST array is empty
I’m trying to make it so you change the number in textbox and hit update, you get re-directed and $_POST[] variable is = to the value of that textbox.