-
Notifications
You must be signed in to change notification settings - Fork 349
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
HorizontalFormTypeExtension
doesn’t play well with CollectionType
in latest Symfony stable
#1167
Comments
Current workaround is to set |
Hi, I described my problem in Symfony's issues (symfony/symfony#19355) and a dev suggested that it could be an usage error by MopaBootsrap (symfony/symfony#19355 (comment)) Can someone experienced here have a look on the issue ? |
Hi there, I confirm that a prototype should not be considered as a root form. It used to work because of a kind of bug in the prototype creation from CollectionType, is there anyway you can fix it in your code? Thanks. |
@HeahDude can you try my PR? Check here to grab it if you don't know how: https://help.github.com/articles/checking-out-pull-requests-locally/ I just added a bunch more tests. I think it should be working properly now. |
@isometriks thanks for taking care of this issue :) Actually I don't use this lib, I was just saying that this "regression" is a bug fix on symfony side so it should be fix on "this" side. Thanks again, cheers! |
Ah ok, thanks! |
@corphi @rejsmont @MichaelMure I think I've solved this, try out v3.1.0 and let me know if you have better luck. You shouldn't have to set horizontal on all children anymore. |
It does work for me, thanks ! |
With symfony/symfony#18317 collection form prototypes have their parent set, but there is no inverse direction, i.e. the prototype is not part of the collection children.
HorizontalFormTypeExtension
sets thehorizontal
view variable on root forms and bubbles its value to the form children. As prototypes are no longer root forms, their value staysnull
and evaluates tofalse
in the template.The text was updated successfully, but these errors were encountered: