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
Multiple forms save mixup #27
Comments
With several forms on one page we ignore the restore of saved forms if they're not being interacted with. Due to how Gravity Forms names its inputs (same for every form) we're unable to set $_POST data for any one form. This is a workaround for #27
I've decided to disable the restoration of form if it's not being interacted with on the page. Gravity Forms names all inputs in all forms in the same manner (input_1, input_2, etc. regardless of the form) and since we're injecting restore data for a saved form by setting the $_POST forcibly (so it appears in the form) we can no longer set the $_POST for a specific form, resulting in the override of a certain input ID on across forms on a page. All inputs with the same name (for example: name="input_1") are set to the same saved or submitted value. This is a short-term fix. This issue will stay open as a reminder to find a better way of restoring form data since overriding $_POST is a bad no-no. |
This is no longer the case with the newer 1.9 support version. |
Discovered while looking into #26. All forms with save functionality get the same value saved (or restored) if they're on the same page during submission, depending on which position the form being saved is in. Sometimes the value is written to both forms, other times the value is not saved at all (again, depending on position of form).
The text was updated successfully, but these errors were encountered: