我已经尝试在FormType.php文件中更改attr “ id”:
->add('content', TextareaType::class,([
'label' => "Description détaillée",
'attr' => [
'placeholder' => "Donnez une description qui donne vraiment envoe de venir chez vous !",
'id' => "test_id"
]
]))
NB:我只想更改“ ID”] >>
谢谢
我试图在FormType.php文件中更改attr“ id”:-> add('content',TextareaType :: class,([['label'=>“ Descriptiondétaillée”,'attr'=> [ '...
您无法在控制器中添加id
,但可以在视图中添加它,如下所示: