Thank you so much! The code worked perfectly. I truly appreciate your help. Best, Valerie
Sure. I will try my best to clarify. In a very simplified manner, the question I want to create will look something like the screenshot below. Respondents are able to freely put together a frozen yoghurt or fruit cup as they would like and the number of calories displayed on the bottom of the question is dynamically updated to show the total number of calories of their order. If I use the code below, I am able to get the total if respondents can choose only one topping per category, but I do not know how to adjust the code to work in a multi-select environment. Code:Qualtrics.SurveyEngine.addOnload(function(){ /*Place your JavaScript here to run when the page loads*/jQuery("input[type=radio]").change(function() { if(jQuery("#QID40 input.radio").is(":checked")){var choiceNum1 = jQuery("#QID40 input.radio:checked").attr("choiceid");var recodeMap1 = {"1" : 100, "2" : 150, "3" : 125, "4" : 0};var qScore1 = recodeMap1[choiceNum1]; } else { var qScore1 = 0; } if(jQuery("#QID41
Hello and thank you for your fantastic help on the topic so far. I came across this post and despite very limited JS knowledge was able to use it in a test run. However, for my purposes I need to allow multiple answers to each question. Meaning a respondent will e.g. have the option to choose between "apples", "bananas", "cherries" and "strawberries" as well as a "none" option. The respondent can then choose to select only one option or multiple options (except for when "none" is chosen which I have set to exclude other answers) within each of the three questions. Would it be possible to adjust the code used by @avashist for my purposes?I would be grateful for any suggestions. Thank you!
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.