Here is how to create a delete button or link with post action and also add confirmation dialog.
echo CHtml::link("Delete", '#', array('submit'=>array('post/delete', "id"=>$data->id), 'confirm' => 'Are you sure you want to delete?'));
In order to delete, you must pass variable through post action, not get action, so here is how you can make a delete button.
1 comment:
So usefull !
I was searching for a long time.
Thank you very much.
le_o
Post a Comment