Go to the next page automatically
Open in new window

In this example, natigation buttons are hidden:

survey.showNavigationButtons = false;

And survey goes to the next page on answering all questions on the page:

survey.goNextPageAutomatic = true";


Survey.Survey.cssType = "bootstrap";
Survey.defaultBootstrapCss.navigationButton = "btn btn-green";

window.survey = new Survey.Model({
    title: "American History", showProgressBar: "bottom", goNextPageAutomatic: true, showNavigationButtons: false,
    pages: [
        { questions: [
             { type: "radiogroup",  name: "civilwar", title: "When was the Civil War?", choices: ["1750-1800", "1800-1850", "1850-1900", "1900-1950","after 1950"]}
        ]},
         { questions: [ 
            { type: "radiogroup",  name: "libertyordeath", title: "Who said 'Give me liberty or give me death?'", choicesOrder: "random", choices: ["John Hancock", "James Madison", "Patrick Henry", "Samuel Adams"]}
         ]},
         {questions: [
            { type: "radiogroup",  name: "magnacarta", title: "What is the Magna Carta?", choicesOrder: "random", choices: ["The foundation of the British parliamentary system", "The Great Seal of the monarchs of England", "The French Declaration of the Rights of Man", "The charter signed by the Pilgrims on the Mayflower"]}
        ]}
    ],
    completedHtml: "<p>Your anwers are:</p><p>When was the Civil War?: <b>{civilwar}</b>. The correct is: <b>1850-1900</b></p><p>Who said 'Give me liberty or give me death?': <b>{libertyordeath}</b>. The correct is: <b>Patrick Henry</b></p><p>What is the Magna Carta?: <b>{magnacarta}</b>. The correct is: <b>The foundation of the British parliamentary system</b></p>"
});
survey.onComplete.add(function(result) {
	document.querySelector('#surveyResult').innerHTML = "result: " + JSON.stringify(result.data);
});


$("#surveyElement").Survey({model:survey});


<!DOCTYPE html>
<html>

<head>
    <title>Welcome to JQuery</title>
    <script src="https://unpkg.com/jquery"></script>
    
    <script src="https://surveyjs.azureedge.net/0.12.22/survey.jquery.js"></script>
    
    
    <link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="./index.css">
</head>

<body>
    <div id="surveyElement"></div>
    <div id="surveyResult"></div>
    <script src="./index.js"></script>
</body>

</html>

.btn-green {
  background-color: #1ab394;
  color: #fff;
  border-radius: 3px;
}

.btn-green:hover, .btn-green:focus {
    background-color: #18a689;
    color: #fff;
}

.panel-footer {
    text-align: right;
    background-color: #fff;
}