Compatibility issues with MP_Forms and Notification Center #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While using this bundle in combination with MP_Forms and the Notification Center, I noticed some issues:
duplicateIndex
incontao-fieldset-duplication/src/Resources/public/jquery.fieldset.duplication.js
Line 20 in acba635
test_duplicate_1
. When you reload the page or a form validation error occurs, the next duplicated input field gets the same nametest_duplicate_1
and overwrites the POST value. I fixed this by searching for the highest duplicate number in 6332d58.prepareFormData
hook receives only fields for the current step, while it requires all fields for the notification tokens. I fixed this by using thegetFieldsWithoutPageBreaks
method and running the cloning logic again in e81e724.MPFormsStepsModule
the fieldsets were not duplicated when reloading the page. ThecompileFormFields
hook is called multiple times because of theMPFormsFormManager
and sometimes the cloned fields were reset. I made sure that in this case the cloning logic in theonCompileFormFields
method is run again. I also used theMPFormsSessionManager
in order to not create a recursion. 2d0a0b8However, I am not sure if these are the best solutions.
/cc @qzminski