-
Notifications
You must be signed in to change notification settings - Fork 181
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
Fix nested subform settings #316
Fix nested subform settings #316
Conversation
6617297
to
a0e05ac
Compare
a0e05ac
to
9cff642
Compare
Not sure what the hhvm test failure is; doesn't look like it was me. |
Thanks for the PR. The HHVM tests fail because of a bug in HHVM (see facebook/hhvm#3797), it's already been fixed but it seems that v3.3.1 has not been deployed to Travis CI yet. I'm not really sure if it is a good idea to throw an Exception when the stack is empty? Wouldn't it be better to fall back to the defaults? |
It seems to me that situation would be equivalent to having unbalanced pairings of opening and closing If you want a way to restore the defaults maybe that should be a separate function? But if you still would rather it restore defaults let me know and I will change it. |
Fix nested subform settings
Ok, thanks for the explanation for this behaviour. |
@althaus How are you triggering |
@vith We had some rare cases, where we had to manually render the Nevertheless the reason I had more trouble than expected was our custom |
Form settings were not being maintained when subforms are involved. If a subform changed a form setting, the parent form would inherit the new value from the subform after the subform was rendered.
I'm assuming the reverse-inheritance wasn't an intended behavior. This patch saves and restores form settings as a stack so that parent forms have their original state after a subform ends.