Answer the question
In order to leave comments, you need to log in
How to implement adding multiple form fields in Symfony2?
There is a "Shop" entity, a store can have several phone numbers.
The first question is how to organize the storage of several numbers, it comes to mind to make a separate entity "Phones" and a one-to-many relationship. Are there other options?
The question is how to add several fields for phone numbers to the form?
Answer the question
In order to leave comments, you need to log in
See forms type collection, you can implement your own form type for this, you have full control over the whole process and the beauty of symfony forms is that any zagagulin can be encapsulated in a reusable form type.
This may be the result of pressing ^s or ^as. Healed by pressing ^q or ^aq respectively.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question