我是symfony的新手。我写了一个表单提交代码。
public function executeEdit(sfWebRequest $request)
{
$userId = $request->getParameter('id');
$this->user = sfGuardUserTable::getUserById($userId);
$this->form = new editOwnerForm($this->user);
$this->paymentForm = new profilePaymentInfoForm($this->user->getPaymentInformation());
if ($request->getMethod() == sfWebRequest::POST) {
$this->form->bind($request->getParameter($this->form->getName()));
if ($this->form->isValid()) {
$this->form->save();
$this->message = 'Successfully updated owner details';
} else {
var_dump($this->form->renderGlobalErrors()); die;
}
}
}
我的表格总是无效的。(总是运行表单的其他部分有效)但我找不到原因。var_dump($this->form->renderGlobalErrors());
不要给任何消息。我该如何解决它。?