Answer the question
In order to leave comments, you need to log in
How to add an entity using select 2 choices?
Please tell me if it is possible to do this: when you enter a string in the field that does not correspond to any entity, an entity with that "name" was created and written to the database.
Answer the question
In order to leave comments, you need to log in
what is stopping you from getting this line in the controller and creating this entity yourself?
For example, we get $city = $form->get('city')->getData(); check if there is such a city and create it if not? The DataTransformer is needed to convert one display format to another; it should not be used as an entity record.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question