Created
April 22, 2014 16:44
-
-
Save rtucker-mozilla/11186162 to your computer and use it in GitHub Desktop.
Loop iteration over an array in surveygizmo syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%pageid = 1; | |
%%errormsg_qid = 6; | |
%%completed_percent = 0; | |
%%slider_array = array(4,7,21,22,23,24,25,26); | |
foreach(%%slider_array as %%slider_id){ | |
%%completed_percent = %%completed_percent + sgapiGetValue(%%slider_id); | |
} | |
if (%%completed_percent != 100){ | |
sgapiHideQuestion(%%errormsg_qid,false); | |
sgapiJumpToPage(%%pageid); | |
}else{ | |
sgapiHideQuestion(%%errormsg_qid,true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for making this! Example SurveyGizmo script are rare!