Thanks for the help and suggestions TomG! I'll figure something out.
Is there some way of enforcing that with users who are entering text into these answer fields? I wouldn't even how to go about using one over the other in the normal survey UI. I wouldn't expect my users to.
Here's the ultimate problem with that though:In order to use this embedded data field anywhere else the javascript code, I have to wrap it in another set of quotations which makes it more or less useless.I tried wrapping it in single quotes the next time I needed to reference this embedded data field on the next page, but that would break any time there was an apostrophe in the string.My only option is to figure out ways around using these embedded data fields in the code, which means that I have to build the payload that I'm sending to my API by hand outside of the code in one of the "Actions" or survey flow API transactions.Way less than ideal.
I have found the issue. There was an apostrophe in the "description" string which is interpreted as a single quote. I'm not exactly sure how I can use an embedded data field in my custom javascript code without adding an extra set of quotes around it thus breaking anything that I try to do with it. This solve with using single quotes seemed to be the ticket, but I guess not.I suspect I will have to add code to escape single quotes/apostrophes in addition to using JSON.stringify on the user's input.
Thanks TomG. That is more or less what I ended up doing. I appreciate you taking the time.
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.