在我的TopicType类中,我使用了:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('title', 'text')
->add('content', 'ckeditor', array(
'label' => 'Contenu',
'config_name' => 'my_custom_config',
'config' => array('language' => 'fr'),))
->add('save', 'submit')
;
}
Run Code Online (Sandbox Code Playgroud)
当我显示表格时,如何在我的第一个字段"标题"上获得自动对焦?
mal*_*olm 13
$builder->add('title', 'text', array(
'attr' => array(
'autofocus' => true
)
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2709 次 |
| 最近记录: |