Tag: forms
-
Symfony 5+ how to make a form field hidden from display
This is easier than it sounds, but I am writing this in case I need to remember what the answer is. At first I wasn’t paying attention to all of the many different Symfony form types in this long list. I totally didn’t see the HiddenType in the list or I didn’t notice it. I…
-
How to change the id for a form input in Symfony 5+
If you create your forms with classes in Symfony 5+ then changing the ID of the form fields is something you are not allowed to do apparently. LOL You can add/change the class and other attributes but not the id. For some reason Symfony ONLY lets you change the id inside the template. I don’t…
-
How to add placeholder text to a Symfony 5+ form row
If you are using the Symfony forms system, which I assume you are if you are here, then this post is for you. Otherwise you figure it out. LOL There is more than one way to do this. However, I am going to show the way I prefer and that is right in the form…