class SiteWidget extends CWidget
{
public $siteId;
public $model;
public function run()
{
$this->model= new Site();
$this->loadSite();
$this->render('SiteTab',array('model'=>$this->model));
}
function loadSite()
{
if($this->siteId != null)
{
$this->model = Site::model()->find('id=:id',array(':id'=>$this->siteId));
}
}
}
The widget view 'SiteTab' contains the code shown below
When a user enters the value for the first text field , this value has to be passed back to the widget , and the remaining fields in the widget have to be populated.
Yii Widgets And Yii Booster Widgets
in The Yii Book
Posted
Hi ,
I am facing problem managing dynamic widgets too.
The widget is as given below ,
The widget view 'SiteTab' contains the code shown below
When a user enters the value for the first text field , this value has to be passed back to the widget , and the remaining fields in the widget have to be populated.
Please help me in achieveing this.
Thanks!