I have a simple form as below, with two buttons that have 'submit' attribute. If the method attribute of the form is POST, then clicking on each button will submit to its 'submit' URL (this is right). But if the method attribute is GET, then clicking button always submits to the URL of the form. Is this a bug?
I'm using yii 1.1.13
Thanks.
I'm using yii 1.1.13
<?php
$form = $this->beginWidget('CActiveForm', array(
'id' => 'search-form',
'action' => array('index'),
'method' => 'get',
));
echo CHtml::button('Search 1', array(
'submit' => array('search1'),
));
echo ' ';
echo CHtml::button('Search 2', array(
'submit' => array('search2'),
));
$this->endWidget();
?>
Thanks.