beginForm() use get method lost route parameter

I use beginForm() with GET method. When I submit the form, it will lose the r parameter .

But use POST method will submit to correct URL with r parameter.

I write a simple controller to test. Press submit button will go to index.php and lose ‘r=test’ parameter.




class TestController extends CController

{

  public function actionIndex()

  {

     echo CHtml::beginForm('','get').CHtml::submitButton().CHtml::endForm();

  }

}



Is there any way to use beginForm() with GET method and submit to correct URL?

I’m wondering the same thing light. Did you ever find an answer to this?

Hi! MattCNS.

That is a HTTP issue. You can find the solution in Form with GET method.