@NiC Thank you so much for taking the time to provide me with this code! I'm going to test it out this evening and I'll let you know how it goes. Edit: @NiC It works perfectly. Thanks again for your assistance! - This would have taken me ages to figure out if this forum didn't exist.
@NiC Thanks for the reply. The latter part of your response is where I'm stuck. Can you provide an example of code that would run jQuery('#'+this.questionId).hide(); based on an embedded data value?
That makes sense. I piped in the 'selected choices recode' and it now works perfectly! For questions that are text entry, would I just pipe the embedded data field instead of using this JavaScript function? You've saved me a ton of work, so thanks again for helping me troubleshoot, Tom!
Checked the contact list and the embedded data fields (and stored values after I completed the baseline) are there, and I double-checked that the function name was spelled correctly and didn't contain extra spaces. Could the issue be related to how I'm piping the survey responses for the embedded data fields that are being saved to the contact list? For example, I'm piping a survey response for any given question using the 'selected choices.' For this to work, do I need to be piping the responses using 'selected choices recode' instead? Tried to add a screencap of my survey flow, but I'm the Imgur link I added doesn't appear to be working. Here's a link instead: https://imgur.com/a/50ARCPb
Thanks, Tom! Your response is incredibly helpful. I've added the JavaScript to the questions that are presented during the follow-up surveys using the embedded data from the contact list. For example, at Time 0, I have an embedded data field labeled Rx1, which holds the first medication the respondent selected. At Time 1, however, the embedded contact list variables aren't being displayed as the default choices. Any places where I might troubleshoot? Is this.setChoiceValueByRecodeValue("${e://Field/T0Q6recode}", true); case sensitive?
Can something similar be done, but using embedded data?
Already have an account? Login
Enter your 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.