Is there a way to set individual form fields name in the FormBuilder?
What I mean is normally you get is form_name[field_name], or if the form_name is an empty string you get field_name.
Now I want to ask if it is possible to rename individual field name and the form still works. Something like this:
First field name="form_name[field_name]"
Second field name="renamed_fildname"
Third field name="form_name[field_name]"
etc...
So is this possible?
More explanation: this is what I am trying to achieve: Default Symfony User Entity with Form Class
I Figured out that the default login requires the input field named: _username and _password, but the form doesn't build that. But the form to be valid its needs the _token field.
Now if I try to add a name to the form:
public function getName(){ return '_'; }
it will but all the names into this form: _[field_names] which is good for the token but not good for my username and password field. its need to be _username and _password but it actually is _[username] and _[password] which isn't good for me, nor for the Security Bundle which simply throws me Bad Credentials.