Hello everyone,
I am currently trying to perform a custom question verification in my survey using Lighthouse Studio. As part of my master's thesis, I am asking 5 true or false questions (i.e., five single choice questions with two answer options each) on one page regarding a specific definition. Respondents should only be directed to the next page if they answer all five questions correctly. If any question is answered incorrectly, an error message should be displayed indicating that one or more questions were answered incorrectly and need to be re-answered. Additionally, the questions should be displayed in a different order on the next attempt to prevent simply clicking the other answer. At the same time, the previous answer for the incorrectly answered questions should no longer be displayed, as the participants would otherwise simply click the other option with two answer choices.
On your website, I only found the procedure for numeric questions and not for single choice questions. Therefore, I tried to proceed analogously, but it didn't work. So far, I have tried the following code:
// Get the answer for question Q1
var selectedAnswer = SSI_GetValue('Q1');
Â
// Check if the answer is not 1 (correct answer)
if (selectedAnswer != 1) {
   // Set the error message
   strErrorMessage = 'The selected answer is incorrect. Please choose the correct answer.';
}
I am not sure if =1 is correct or how to describe that the first out of the two answer options is correct?
It would be very kind of you if you could improve or supplement it.
Best regards,
Noemi Weber