0
我想预定义TEXT-INPUT字段 - 属性VALUE。可以通过设置方法中的其他选项的sfWidgetFormInputText来做到这一点吗?Symfony 1.4(FORMS)是否可以通过sfWidgetFormInputText设置值属性
我想预定义TEXT-INPUT字段 - 属性VALUE。可以通过设置方法中的其他选项的sfWidgetFormInputText来做到这一点吗?Symfony 1.4(FORMS)是否可以通过sfWidgetFormInputText设置值属性
class ContactForm extends BaseForm
{
public function configure()
{
// ...
$this->setDefault('email', 'Your Email Here');
$this->setDefaults(array('email' => 'Your Email Here', 'name' => 'Your Name Here'));
}
}