In a Symfony 4 form, I am trying to get a placeholder on my input. I tried the code below, but I get an error telling me it's not allowed. Any ideas how else I can achieve this?
$builder->add('firstname', TextType::class, ['label' => 'Vorname ', 'placeholder' => 'Your name',])
As suggested in the documentation I have also tried the code below, in this case I am not getting an error, but nothing is rendered.
$builder->add('firstname', TextType::class, ['label' => 'Vorname '], ['attr' => ['placeholder' => 'Vorname ']])