I search to use underscore or dot instead of brackets with FormType in URL query with GET method.
Current
I've actually this URL when I submit my form:
/path?fieldName%5BsubFieldName%5D=toto
Or this (decoded):
/path?fieldName[subFieldName]=toto
Expected
I'd like to have this:
/path?fieldName_subFieldName=toto
Or this:
/path?fieldName.subFieldName=toto
Tried
I tried a few options in the form configuration but I don't know what they correspond to, and I don't know where to google (what terms to use).
It's the normal behaviour of Symfony Form Component. To avoid this, you should use named form builder, like this :
For the button, you have to remove it from your
Form
class (i mean, theSubmitType
one), and add it manually tou your html (with classical<button></button>
inside of your form rendering)