Closed albrin closed 7 years ago
You need to use Collections for this functionality. type1
becomes your collection and FIO
is an item in this collection
You can accomplish this with fieldsets. When you add a fieldset to a form (or even another fieldset), it gets nested in the way you indicated, causing array notation in the client.
Closing because question was answered.
What about the ajax route ? Any way ?
This array item:
'clients[0]': $('[name="clients[0]-' + id + '"]').val()
gets its closing square bracket stripped away.
@stephaneeybert Sorry, but I think this is the wrong place for question. There is no Ajax or JavaScript.
How can I use square brackets in name of form element?
Render form
$_POST ($request->getPost()->toArray())
But when I do fill and submit the form - not the values are set and the form does not pass validation.