如何重置我的表单域值?
action:
$this->form = new $class();
$this->form->bind($request->getParameter('signin'));
if ($this->form->isValid())
{
$values = $this->form->getValues();
$this->redirect('@example');
}
else
{
if ($this->form->hasGlobalErrors())
$this->errorclass = 'error';
}
$this->form->resetFormFields();
return $this->renderPartial('ajax/example);
我有 2 个字段 email 和 pw:想在它们清空后重置它们
这不起作用:(
$this->form->resetFormFields();
有什么解决办法吗?谢谢你