Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Questionnaire scripting: Difference between revisions

From Catglobe Wiki
No edit summary
No edit summary
Line 1: Line 1:
Questionnaire scripting
Questionnaire scripting
The context for questionnaire scripts defines three variables which should not be overwritten if the questionnaire author intends to handle events which the new viewer triggers - these variables are:
The context for questionnaire scripts defines three variables which should not be overwritten if the questionnaire author intends to handle events which the new viewer triggers - these variables are:<br>
● Viewer <br>
● Viewer <br>
● Questionnaire <br>
● Questionnaire <br>
● AnswerSheet (alias for this) <br>
● AnswerSheet (alias for this) <br>
Answer sheet event handlers
Answer sheet event handlers <br>
AnswerSheet
AnswerSheet
   .bind('beforeCompleted', function(ev, answerSheet, questionnaire) {
   .bind('beforeCompleted', function(ev, answerSheet, questionnaire) {

Revision as of 07:29, 22 June 2020

Questionnaire scripting The context for questionnaire scripts defines three variables which should not be overwritten if the questionnaire author intends to handle events which the new viewer triggers - these variables are:
● Viewer
● Questionnaire
● AnswerSheet (alias for this)
Answer sheet event handlers
AnswerSheet

 .bind('beforeCompleted', function(ev, answerSheet, questionnaire) {
 })
 .bind('afterCompleted', function(ev, answerSheet, questionnaire) {
 })
 .bind('beforeMoveToNextPage', function(ev, answerSheet, questionnaire) {
 })
 .bind('beforeMoveToPreviousPage', function(ev, answerSheet, questionnaire) {
 })
 .bind('beforeShowPage', function(ev, answerSheet, questionnaire) {
 })
 .bind('afterShowPage', function(ev, answerSheet, questionnaire) {
 })
 .bind('afterValidateQuestion', function(ev, question, state) {
 });

Note: Questionnaire script do NOT execute while redirect to another questionnaire Question scripting The context for question scripts defines two variables which should not be overwritten if the questionnaire author intends to handle events which the new viewer trigger - these variables are:

● Question
● <QUESTION-LABEL>

Question event handlers Question

 .bind('beforeShowQuestion', function(ev, question) {
 })
 .bind('afterShowQuestion', function(ev, question, jqe) {
 })
 .bind('afterValidateQuestion', function(ev, question, state) {
 });