Is it possible to use formConnector in Yii?
Is there any documentation/sample on how to do it?
I created the function in my controller:
public function actionForm() {
$connector = new FormConnector(null, "PHPYii");
$connector->configure(
new Komunikaty(),
"id","id, temat,id_user,tresc,data_wpisu,waznosc"
);
$connector->render();
}
When I use it in myForm.load(‘./controllername/form/’ + id)
the function returns me tag with all database records in the Komunikaty Table…
When I tried to use this function as data Processor link to insert a new record - it failed.
I even tried the foillowing for loading:
public function actionForm($id) {
$connector = new FormConnector(null, "PHPYii");
$connector->configure(
Komunikaty::findOne($id),
"id","id, temat,id_user,tresc,data_wpisu,waznosc"
);
$connector->render();
}
Unfortunately it failed as well.