Forms Symfony embed i18n表单不希望保存
这是我的密码。在我的表单配置中,我写:Forms Symfony embed i18n表单不希望保存,forms,symfony1,internationalization,symfony-1.4,Forms,Symfony1,Internationalization,Symfony 1.4,这是我的密码。在我的表单配置中,我写: $this->embedI18n(array('en', 'bg')); $this->widgetSchema->setLabel('en', 'English'); $this->widgetSchema->setLabel('bg', 'Bulgarian'); 在我的操作中,我尝试以以下方式保存此表单: $agree= Doctrine_Core::getTable('agreements')-&
$this->embedI18n(array('en', 'bg'));
$this->widgetSchema->setLabel('en', 'English');
$this->widgetSchema->setLabel('bg', 'Bulgarian');
在我的操作中,我尝试以以下方式保存此表单:
$agree= Doctrine_Core::getTable('agreements')->findOneById('1');
//Myuser::pd($agree);
$this->form= new agreementsForm($agree);
if ($request->isMethod('post'))
{
$this->form= new agreementsForm($agree);
$this->form->bind($request->getParameter($this->form->getName()));
if ( $this->form->isValid())
{
$agree=$this->form->save();
//$this->redirect('homepage');
}
}
在视图中,当我单击“编辑”时,我会看到这两种语言的表单以及每种语言的值,但当我尝试保存表单时,它不想保存。问题是我没有错误。EVRITTING i GONG ok bind在此isValid()之后是ok end after save操作正在重定向我,但表单值未保存。我建议您放置一些
var_dump()代码>,就像前面的bind()
,一个接一个地查看对象是否已保存,等等。。