February 11, 2013, 12:58pm
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(
/// here missing code ?
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
February 11, 2013, 1:11pm
I think you need to set the action attribute:
February 11, 2013, 1:28pm
Thanks , it’s work So if i need to convert it to widget just i can add
or with widget something else ?
February 11, 2013, 1:40pm
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?