This is my first topic, so hello everyone! I'm a Symfony2 newbie however I'm learning fast so I hope I will be able to skip to next level and help others too .
Ok, so, here we go with my question.
Is anybody know how to build Symfony 2 form (using Doctrine 2 and annotations) described as:
1. I have KingEntity which contains "type", "settings" and "somethingElse" fields. Field titled "settings" will contain serialized data as it can differ depending on "type" selected.
2. When type==1 I want get child-form (or something like that, maybe some sets of fields??) for QueenOne. And when type==2, I want get QueenTwo child-form/entity, and so on. Each Queen* form contains different fields that's why I want to serialize it and put just in one "settings" field. I don't want to create new tables in database and create relations between them at all.
3. So, if type==1 is selected, I want validate this form using QueenOne form. If validation success, I want to serialize that data from QueenOne and put into "settings" field of KingEntity, so KingEntity is keeped in database and it contains only "type", "settings" and "somethingElse" fields.
4. I'm not interested with viewing this form, I need only backend part of logic for this kind of form.
I hope I've explained it clearly. Any help will be appreciated.
Thanks in advance!