In support we get asked if we can have the back button target a specific page. Though this is not a built-in feature, we do have a script for that! In our survey below if you click the back button you will be sent to the Thank You Page.
Check it out in an example survey.
OR
Add a survey with this setup to your account!
Setup
On the page(s) you'd like this to happen click Add New Action > JavaScript and paste the code below.
//Set this variable to Page ID that the back button will be sending to.
var pageID = 1;
$(document).ready(function(){
$('.sg-back-button').attr("onclick","$('sg_navchoice').value='sGizmoBackButton';this.form.action=this.form.action+'?__sgtarget="+pageID+ "&';return(true);");
});
Required Customization
The only modification you'll need to make is to change var pageID = 1 to the page ID you'd like the respondent to jump to. For more information on question, page and option ids check out our tutorial on How to Find Ids.
Then do some testing. Go through your survey and see if your back button redirects to the correct page. If for any reason it doesn't, check your page IDs.
Scripting and Other Custom Solutions
We’re always happy to help you debug any documented script that is used as is. That said, we do not have the resources to write scripts on demand or to debug a customized script.
If you have customization ideas that you haven't figured out how to tackle, we're happy to be a sounding board for SurveyGizmo features and functionality ideas that might meet your needs. Beyond this, check out our Professional Services; these folks have the scripting chops to help you to achieve what you are looking for!
Admin
— Dave Domagalski on 04/16/2018
@Duncan: Thank you for your note!
I'm sorry for the trouble! I fixed up the example, and that is working now (using the documented script).
As far as tips to get this working, the Page ID is the most important aspect (since that is the only part of the script that should be modified).
It is important to note that Page ID is different than Page number, As such, the best first step in troubleshooting is to confirm that the Page ID is correct.
To make sure that you have referenced the correct Page ID, the following document is helpful:
https://help.surveygizmo.com/help/how-to-find-ids
I hope this helps!
David
Documentation Specialist
SurveyGizmo Customer Experience
— Duncan on 04/16/2018
Hi - I am trying this without success - your example doesn't work on my machine either (Mac running safari). any tips to get it working?