Call Action In Form / Render Partil

Hi All

I need to build search form and use it in all my site , so i used render partile but the problem is if i called it

data will send to current page and not return anything , I need to add something to action to call controller in form .




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

	'id'=>'events-serach_block-form',

/// here missing code ?

	'enableAjaxValidation'=>false,

)); 


?>

the code above in normal way that mean the view will call action in current controller that’s true ?

how to fix it and call controller to process data ?

Thanks in advance

I think you need to set the action attribute:




    'action'=>array('searchcontrollerid/searchactionid'),



Thanks , it’s work So if i need to convert it to widget just i can add

‘action’=>array(‘searchcontrollerid/searchactionid’),

or with widget something else ?

I’m not sure what you mean. If you want to wrap the whole search section in a widget then I expect you’d create an attribute in your widget to hold the action route and then pass that on to the CActiveForm widget. Have I misunderstood the question?

Yes :)