0

I would like to create a form which has multiple input fields corresponding to the elements of an array. In ASP.Net MVC 3 I had the ModelBuilder that encoded information about the underlying model inside the input HTML tags and rebuilt the model automatically on POST but I haven't managed to find something similar in Symfony2.
Could anyone tell me whether in Symfony2 there is a way of telling the FormBuilder that the field it receives by calling the add method is actually an array?

1 Answer 1

3

This can be done using the form 'Collection' field type. See the Symfony Cookbook entry on 'How to Embed a Collection of Forms'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.