Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
21 Oct 2019 at 12:44 UTC
Updated:
18 Nov 2020 at 13:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lobodakyrylo commentedThe problem is Back Button emulates the Reset button so I see reset submission. I tried to rewrite a piece of code to avoid this behavior and it works for me.
Comment #3
jrockowitz commentedAttached webform replicate the issue and the attached patches fixes the reset button but not the back button.
Comment #4
jrockowitz commentedThe back buttons still does not work with Ajax.
Comment #5
virajrajankar commentedComment #6
lobodakyrylo commentedThis works for me
Comment #7
paulocsI don't know if I'm reproducing the issue correctly but I follow this steps:
1) Create a new webform
2) Add the fields, set "Limit users to one submission per webform/source entity" and set Confirmation Type as Inline.
3) Go to the form page, add values to the fields and submit it.
4) Click on the Back button.
I see the fields with the data that I submitted.
Cheers, Paulo.
Comment #8
jrockowitz commentedI still see the issue with the back button and Ajax for the patch from #6.
The issue is the confirmation page's hidden back button is no longer being rendered when the back button's Ajax request is coming back to the server because the last submission is being automatically loaded (\Drupal\webform\WebformSubmissionForm::setEntity). The confirmation page is no longer being displayed with the hidden back button.
The ajax request breaks because the triggering (back button) element is removed from the rendered form.
I do not see any easy solutions. The attached patch disables the ajax behavior for the back button for webforms with unique limits.
Comment #9
jrockowitz commentedComment #11
jrockowitz commentedUnderstanding the complexity of the issue the patch from #9 is the best solution to prevent the backlink from not working.
For webforms, with unique limits using a confirmation message is the best approach and works fine with Ajax.