CHtml::beginForm() doesn't use my Parameters

Hi, i use the following code to open a formtag:


echo CHtml::beginForm(array(

	'action' => 'hotelSearch/hotelSearch',

	'method' => 'get')); 


But in the generated HTML, the action defined in the form tag is the action of the form itself (like $_SERVER[‘PHP_SELF’]) and also, the method is “post”.

I can’t really see what i am doing wrong here :(

try …beginForm(‘hotelSearch/hotelSearch’,‘get’);

also take a look here for a NOTE about using GET … http://www.yiiframew…chtmlbeginform/

That doesn’t work. I can use


without changing the controller. But what if i want to change the controller?

And why does my first attempt not work?


First argument is action, you should pass: array(‘hotelSearch/hotelSearch’),

Second argument is method (‘get’ in your case),

And third argument is an array of html options. For example: array(‘enctype’=>‘multipart/form-data’).