Cactiveform Use Get Variable

I have in my list view one Button (Order by Name) and a search textfield.

I would like they work together, so you can search and organize in same time.

Example: if searched, when click in Organize it add the order in url, not erase all.

Search Button:


$this->beginWidget('CActiveForm', array('htmlOptions'=>array 'action' => $this->createUrl('user/list'), 'method'=>'get')); ?>

echo CHtml::textField('search', ''); 

echo CHtml::submitButton('Procurar', array('class'=>'btn', 'name'=>''));



Order by Name Button:

<a href="<?=Yii::app()->createUrl('user/list',array('order'=>'name'))?>">Nome</a>