所有内容都在标题中。用URL参数预填一个窗体小部件(symfony)
我得到的URL PARAM:
$log = $request->getParameter('logement');
Widget的声明:
$this->widgetSchema['logement'] = new sfWidgetFormInputText();
而且我通过它的形式预填我的窗口小部件 'logement':
$this->form = new bailForm(array('logement' => $log));
我已经在symfony的doc中读过它,但是当我这样做时,我有这个错误:
The "BailForm" form only accepts a "Bail" object.
我已经尝试了许多在互联网上找到的东西,但没有人工作。
EDIT
的ORM是教义 “Logement” 为 “支架”
EDIT的属性2
我曾尝试:
$log = $request->getParameter('logement');
$this->form = new bailForm(null, array('logement' => $log));
我没有错误,但我的小部件“logement”未填充...