Revision #29 has been created by resurtm on Aug 11, 2011, 8:37:16 AM with the memo:
generating dropdownlists with optgroup
« previous (#25) next (#30) »
By Example: CHtml
listData, chtml, link, button
**Example 9: Linking to a controller action via POST with confirmation dialog**
Delete actions created using gii require the delete request be sent via POST to help prevent deleting objects by accident. Below is an example how to create a link that sends the request via POST and also asks for confirmation. Where you are redirected after the delete depends on your delete action.
<?php echo CHtml::link('Delete',"#", array("submit"=>array('delete', 'id'=>$data->ID), 'confirm' => 'Are you sure?')); ?
find CHtml class at `yii/framework/web/helpers/CHtml.php`
[Russian Version dropDownList()](http://dbhelp.ru/by-example-chtml-dropdownlist/page/)
[Russian Version listData()](http://dbhelp.ru/by-example-chtml-listdata/page/)