Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 html5 占位符属性为文本输入设置默认消息,例如“添加您的评论”。有人知道如何在 Symfony 1.4 中做到这一点吗?
您可以在第二个参数中将任何 html 属性添加到小部件:
$this->form->setWidgets(array( 'name' => new sfWidgetFormInput( array('label' => 'Your Name'), array('placeholder' => 'Add your comment') ), ));