-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Form] Document how unmapped forms can be implemented #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@weaverryan this should get a |
I found the If this is correct, I would start adding the virtual description to 2.0, waiting till it's merged in 2.1/2.2 and then add the mapped to 2.1. Is this the way to go? |
@Sgoettschkes |
@stof I know. Maybe I described it the wrong way:
To make merging the document easier, I was thinking about adding the It's a workflow we use at work very often when many changes are expected against one document, to prevent merge conflicts. If you don't think this is neccessary I don't mind doing both PR at the same time, but I still think they have to be split up as mapped was introduced in 2.1, right? |
You're workflow is the way I recommend to use (it's the most GITish solution) |
I just realized there is a whole cookbook explaining the virtual option: http://symfony.com/doc/2.1/cookbook/form/use_virtuals_forms.html Does this mean only tthe |
Both of the options aren't documented yet on the form reference, that's something that needs to be done. See also #2362 |
See symfony/symfony#3995
A form that does not map to the data of its parent should either be
Unmapped forms are completely independent of their data. They have their own data, and children will be accessed to this data.
Virtual forms are not mapped to their parents data, but their children are.
Unmapped forms are useful if you want to embed forms that don't have a connection with the data of their parent form.
Virtual forms are useful if you use a form only in order to structure your view (see symfony/symfony#3995) or if you want to collect a set of field definitions that can be inserted ("copied") into the parent form (think traits).
The text was updated successfully, but these errors were encountered: