Closed (fixed)
Project:
YAML Form
Version:
8.x-1.0-beta22
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2016 at 16:22 UTC
Updated:
2 Dec 2016 at 12:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
KevinvdBurg commentedsmall edit
Comment #3
jrockowitz commentedPlease see: http://stackoverflow.com/questions/19926641/how-to-disable-back-button-i...
The YAML Form module now includes the ability to inject custom CSS/JS into a form so you could test out a few possible solutions.
If you found a cross-browser way to stop a user from navigating back using the browser's back button that would be amazing.
This would also solve #2826522: Browser back button is causing form wizard to lose its current page and all submitted data.
Comment #4
jrockowitz commentedThe below code snippet from http://stackoverflow.com/questions/17962130/restrict-user-to-refresh-and... actually worked in Chrome.
Comment #5
jrockowitz commentedThis seems like even a simpler solution and make reasonable arguments why one would disable the back button.
--- http://www.codeproject.com/Tips/632336/Disabling-browsers-back-button
Comment #6
KevinvdBurg commentedThx jrockowitz, I think I got it.
I used a combination using this:
and this: http://stackoverflow.com/questions/28028297/js-window-history-delete-a-state
Resulting in that you can't use the back button on the active form. (Tested on Chrome, Firefox and Safari).
It would be nice if this is still a feature in YAML Form because I can't imagine that I'm the only one that whats this for there wizard pages.
Comment #7
jrockowitz commentedYes, I am going to add this feature.
Comment #10
jrockowitz commentedComment #13
jrockowitz commentedPlease download or checkout the latest dev release to review.
Comment #14
KevinvdBurg commentedThanks for the patch :D
I downloaded the latest version of the dev branch and tested it.
I'm getting this error when i'm creating a new Form and edited an existing one:

Pastebin
Comment #15
jrockowitz commentedYou probably need to run the pending database updates.