php - Symfony Forms - Is it possible to create a single entity from two forms? -
I understand that you can embed the form in some other form.
- UserCoreType:
Username ,
password ,
email
- UserPersonalType: I want to do this with a registration form, which included both of these types, and I only provide personal information I want to create another form to update (i.e. not really a new look, just use UserPersonalType)
I try to create 2 different user entities How can I do it for each form? I need to build a unit.
OR
How can I restrict the field? If I had to create just one user type, how can I make it so that the unit can be built earlier?
For registration form simply enter
UserPersonalType in
UserCoreType Embed and use individual
UserPersonalType to update personal information.
UPDATE
You can also use a single form for registration and updated information. Some fields use
PRE_SET_DATA on the
EventListener to read only.
- UserPersonalType: I want to do this with a registration form, which included both of these types, and I only provide personal information I want to create another form to update (i.e. not really a new look, just use UserPersonalType)
Comments
Post a Comment