私はsymfony 1で作業しています.RenderPartial関数を使用してウィジェットをポップアップに配置すると、次のエラーが発生します:
注意: 未定義の変数: 49 行目の ...templates/template.php のフォーム
致命的なエラー: 49 行目の .../templates/template.php の非オブジェクトに対するメンバー関数 open() の呼び出し
これはclass.phpの私の関数です:
public function executeProduct(sfWebRequest $request)
{
$this->renderPartial('integrate/Product');
$form = new ProductForm();
if ($request->isMethod('post') && $request->hasParameter($form->getName()))
{
$form->bindRequest($request);
if ($form->isValid())
{
$form->save();
return $this->redirectBack();
}
$this->forms['product'] = $form;
}
else
{
foreach ($form->getGlobalErrors() as $nom=>$error)
{
echo $nom.':'.$error;
}
}
}
その解決策として何ができますか?