K
K
kapai692015-01-18 17:11:09
symfony
kapai69, 2015-01-18 17:11:09

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

3 answer(s)
S
Sergey, 2015-01-18
Protko @Fesor

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.

J
jcmvbkbc, 2017-07-17
@jcmvbkbc

This may be the result of pressing ^s or ^as. Healed by pressing ^q or ^aq respectively.

N
Nikolai Savelyev, 2017-07-17
@nikweter

Change input language? Can you switch to Russian?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question