Allow your clients/users run survey only one time.
Open in new window

Send the survey results before moving on the next Page default is false.

If you have a long survey, many your users may not finish the survey and enter the data on few pagers on only the first one. If you still want to save the information from incompleted surveys, set this property to true. The clientId property should bet set correctly, otherwise the data of others users may be ovewritten.

survey.sendResultOnPageNext = yourvalue;

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

var clientId;


function runSurveyCheck() {
    clientId = document.getElementById('clientIdinput').value || 'e2bd506a-a218-4f5c-b8ae-768f203e399b';
    new Survey.dxSurveyService().isCompleted('47e699f7-d523-4476-8fcd-be601c91d119', clientId, onCheckCompleted);

function onCheckCompleted(success, result, response) {
    if(!success) return;
    if(result == 'completed') {
        alert('You have already run the survey!');
    } else {

function runSurvey() {
    window.survey = new Survey.Model({
            surveyId: 'e7866476-e901-4ab7-9f38-574416387f73',
            surveyPostId: 'df2a04fb-ce9b-44a6-a6a7-6183ac555a68'
    }, "surveyElement");
    survey.onComplete.add(function(result) {
    	document.querySelector('#surveyResult').innerHTML = "result: " + JSON.stringify(;
    survey.onSendResult.add(function (survey) { 
        var text = "clientId:" + survey.clientId + ". The results are:" + JSON.stringify(  + String.fromCharCode(13, 10);
        var memo = document.getElementById('serverResultArea');
        memo.value = memo.value + text;
    survey.sendResultOnPageNext = true;
    survey.clientId = clientId;



<!DOCTYPE html>

    <title>Welcome to JQuery</title>
    <script src=""></script>
    <script src=""></script>
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="./index.css">

    <button onclick="runSurveyCheck()">Rerun Survey</button>
       <dd> <input id="clientIdinput" placeholder="e2bd506a-a218-4f5c-b8ae-768f203e399b"/> </dd>
      <dt>Survey results sent to the server:</dt>
       <dd> <textarea id="serverResultArea" rows="5" cols="50"></textarea> </dd>
    <div id="surveyElement"></div>
    <div id="surveyResult"></div>
    <script src="./index.js"></script>


.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;