❌Numeric screenout

Add a screenout condition when using numeric inputs.

Currently, we don't have a feature to screenout numeric inputs. SynoSurvey is limited by the time being to screenout non open ended answers. This means that we need a new way to achieve it.

Add your question

Fig. 1 - Adding the text input you want to validate

Add the script to allow only numeric inputs.

πŸ”’Numeric validation

Add a new page for the screenout and a single select question to set if condition is met.

Fig. 2 - Adding a validation question, remember to add a description so teammates can understand what it is for.

Use this script and change the parameters with your actual question and page identifiers.

document.querySelector("body").style.display = "none";
answers = {};

response.answers.forEach((answer) => {
    if(answer.questionCode == "") {
        answers[answer.questionCode] = Number(answer.value);
    }
})

var radio_buttons = document.querySelectorAll(".form-check > input");

// Here you can set a custom condition, this is an example:
if(answers[""] < ) {
    radio_buttons[0].click();
}

// If condition is not met
else {
    radio_buttons[1].click();
}

document.querySelector("#p_next").click();

Go to Conditions tab and add a condition for the screenout

Fig. 3 - Adding a screenout to the question when a value is selected.

Last updated

Was this helpful?