我想预定义 TEXT-INPUT 字段 - 属性 VALUE。是否可以通过设置方法中其他选项的 sfWidgetFormInputText 来做到这一点?
			
			1001 次
		
1 回答
            2        
        
		
阅读文档。
class ContactForm extends BaseForm
{
  public function configure()
  {
    // ...
    $this->setDefault('email', 'Your Email Here');
    $this->setDefaults(array('email' => 'Your Email Here', 'name' => 'Your Name Here'));
  }
}
于 2012-04-10T18:27:52.517   回答