How to re-code slider response value on submit? | XM Community
Skip to main content
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.
Hello @cprice ,



You can create an embedded data and based on branch logic of slider question set the value of this embedded data.
That's great, thank you for the tip. Does anyone have sample code that might demonstrate how to do this?
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!

Leave a Reply