How to re-code slider response value on submit? | XM Community
Skip to main content
Solved

How to re-code slider response value on submit?

  • May 6, 2019
  • 3 replies
  • 26 views

Hello, I have been using JavaScript and jQuery to customize various elements of my survey thanks to a lot of the tips I have found here in the community. I was wondering if anyone has successfully used JS to re-code slider responses? I have a need to invert a submitted question response so that what gets entered into the database is different than what the user has picked (e.g. a response of 8 would actually be recorded as a 2). Has anyone managed to do this on a per-question basis? If so, any tips would be much appreciated. Thank you in advance.

Best answer by Anonymous

Hello @cprice , You can create an embedded data and based on branch logic of slider question set the value of this embedded data.

3 replies

  • Answer
  • May 16, 2019
Hello @cprice , You can create an embedded data and based on branch logic of slider question set the value of this embedded data.

  • Author
  • May 16, 2019
That's great, thank you for the tip. Does anyone have sample code that might demonstrate how to do this?

  • Author
  • July 29, 2019
to follow up on this long-ago answered question of mine, the provided answer was correct about embedded data. i finally learned how to use it and math operations to get this desired functionality. thanks!