β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

Add the script to allow only numeric inputs.
π’Numeric validationAdd a new page for the screenout and a single select question to set if condition is met.

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

Well done! If you followed all the steps below, it should be working well.
Last updated
Was this helpful?