This javascript can be used to add a “Back” button to go back to the last page displayed (following the correct questionnaire flow and skipping unanswered questions). The button will be aligned to the standard “Next” button.
The script has to be set as global script. It’s compatible with CATI and CAWI.
Notes:
- This script is only compatible with V6 templates.
- If you’re using the new customizable templates you can easily add the “Back” button by opening the template editor, click on “Buttons” then enable the Back button by selecting either Text, Text and Icon or Icon in the dedicated section.
Instructions #
In the survey Settings select the “Advanced” tab. Click on “Edit script” and paste the code in the editor.
Click on “OK” to go exit the editor and save the editing.

<script>
$(document).on("core.pageRendered",function(){
var pathname = window.location.pathname; // Returns path only
$("#prevButtonPage").remove();
var input = $("<button id='prevButtonPage' class='btn btn-success btn-large btn-block button-next-page'><strong>Back</strong></button>");
input.appendTo("#footer");
$("#footer").addClass("buttonAdded");
$("#prevButtonPage").on("click",function(){
$("#testmodePageLastAnswered").trigger("click");
});
});
</script>
