Hi! I'd like to automate my survey to make a question dynamically change based on the month and year. For example, if it's Jan/Feb/Mar, one version of the question would be asked (with different options), and if it's Apr/May/Jun, a different version would be asked.
I know this question has been asked many times, but I've researched and tried everything and for some reason this still isn't working for me - trying to assign an embedded data field called UserAge from a question getting birthday in the format MM/DD/YYYY.1. I've set an embedded data field, UserAge at the start of my survey flow.2. I've placed a block below with the question asking for birthday, with the following JS:Qualtrics.SurveyEngine.addOnPageSubmit(function() { var age = moment().diff(moment(jQuery("#"+this.questionId+" .InputText").val()), 'years'); Qualtrics.SurveyEngine.setEmbeddedData('UserAge', age);});Have also tried the different codes on this thread (and looked at other threads as well):https://www.qualtrics.com/community/discussion/1397/javascript-to-calculate-users-age-based-on-dob-check-age-eligibility-provide-validation-alert/p13. After the block, I have a "Then" branch based on UserAge (if under 18, terminate).Am I missing anything? For some reason, I can't ge
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.