Skip to content
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

Compatibility issues with MP_Forms and Notification Center #22

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MarkejN
Copy link
Contributor

@MarkejN MarkejN commented Nov 30, 2022

While using this bundle in combination with MP_Forms and the Notification Center, I noticed some issues:

  1. The duplicateIndex in is initialized to zero when the page is loaded. When you create a duplicate, the input field gets a name like test_duplicate_1. When you reload the page or a form validation error occurs, the next duplicated input field gets the same name test_duplicate_1 and overwrites the POST value. I fixed this by searching for the highest duplicate number in 6332d58.
  2. The prepareFormData hook receives only fields for the current step, while it requires all fields for the notification tokens. I fixed this by using the getFieldsWithoutPageBreaks method and running the cloning logic again in e81e724.
  3. When using the MPFormsStepsModule the fieldsets were not duplicated when reloading the page. The compileFormFields hook is called multiple times because of the MPFormsFormManager and sometimes the cloned fields were reset. I made sure that in this case the cloning logic in the onCompileFormFields method is run again. I also used the MPFormsSessionManager in order to not create a recursion. 2d0a0b8

However, I am not sure if these are the best solutions.

/cc @qzminski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant