Hi! I am trying to create a variable that counts the number of choices that currently exist in my question to make a loop, as I need to browse the possible choices to evaluate if they have been checked and set them to a specific value. The options are dynamic, as they appear depending on whether a YES was given in two different previous questions. I think I could also get this value if I use the If else option, but I wanted to know if there is a possibility to do it with only one line of code and not 6 or 7. Here below is my code for more context of what I tried (numSelectableOptions): Qualtrics.SurveyEngine.addOnPageSubmit(function() {var x = jQuery("#" + this.questionId + " input[type=text]").eq(0).val();var y= jQuery("#" + this.questionId + " input[type=text]").eq(1).val();var z = jQuery("#" + this.questionId + " input[type=text]").eq(2).val();var numSelectableOptions = jQuery("#" + questionId + " .q-checkbox:not(.q-disabled)").length; // Loop through each item and check if it'
I am using a matrix table with allow entry text function. For some questions I want to save the text. I found that I can use piped text of one of those question, for example using ${q://QID330/ChoiceTextEntryValue/3} I am trying to save the text in a variable in java. So, I try to use the following codes that i see in other posts:var itemtext= "${q://QID330/ChoiceTextEntryValue/3}";var itemtext= jQuery("#QID330 input[type=text]").eq(0).val();var itemtext= jQuery("#QID330 option:selected").text(); But, none one works, any idea what can work for this?
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.