Cart Licenses Contact Support Online Creator Log in/Register
Try
Free
v 1.9.44

Autonextpage


                        
        
            Survey.StylesManager.applyTheme("bootstrap");
            Survey.defaultBootstrapCss.navigationButton = "btn btn-green";
        



                
                    var json = {
    title: "American History", showProgressBar: "bottom", goNextPageAutomatic: true, showNavigationButtons: false,
    pages: [
      {
        "elements": [
          {
            "type": "radiogroup",
            "name": "civilwar",
            "title": "When was the Civil War?",
            "choices": [ "1750-1800", "1800-1850", "1850-1900", "1900-1950", "after 1950" ]
          }
        ]
      },
      {
        "elements": [
          {
            "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" ]
          }
        ]
      },
      {
        "elements": [
          {
            "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>"
};

                    window.survey = new Survey.Model(json);
                
        
            survey.onComplete.add(function(sender) {
            document.querySelector('#surveyResult').textContent =
            "Result JSON:\n" + JSON.stringify(sender.data, null, 3);
            });
        
            
                survey.render("surveyElement");
            

                    
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Autonextpage, Knockoutjs Survey Library Example</title>
    
<meta name="viewport" content="width=device-width" />
    <script src="https://unpkg.com/knockout@3.5.1/build/output/knockout-latest.js"></script>
    <script src="/DevBuilds/survey-core/survey.core.min.js"></script>
    <script src="/DevBuilds/survey-core/survey.i18n.min.js"></script>
    <script src="/DevBuilds/survey-knockout-ui/survey-knockout-ui.min.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 style="margin: 0">
    
            <div id="surveyElement" style="display:inline-block;width:100%;">
            </div>
    <div id="surveyResult"></div>

<script type="text/javascript" src="./index.js"></script>

</body>
</html>
Settings

In this example, navigation buttons are hidden:

survey.showNavigationButtons = false;

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

survey.goNextPageAutomatic = true";

Tell Us What You Think

Help us serve you better by taking this brief survey.
We are interested to learn more about your
experience of using our libraries.

We'd really appreciate your feedback.

Start the Survey

Approximate time to complete: 2 min.