CActiveForm and clientChange() submit problem


I try to create linkButton inside CActiveForm widget, for example:

echo CHtml::linkButton('link', array('submit' => '', 'params' => array('test'=> 1) ))

As you see, I would like to submit this form after clicking at ‘link’.

But it doesn’t work INSIDE form. When I replace this code OUTSIDE form it works! :-[

Any ideas?




I encountered the same problem with a dropdown list .

It’s not beautifull but works : do a js click() on your submit button

echo CHtml::linkButton('link', 

   array('onClick'=>'$(\'#yourFormId\').attr(\'action\' , function(){return this.action + \'&test=1\'});



I adapted your code but haven’t tested it !

for multiple roundtrip (validation, refresh), delete the parameters by forcing action in CActiveForm

<?php $form=$this->beginWidget('CActiveForm', array(






hope this help