Update: I wanted to let you all know that the code is working as intended. However, when people "skip" the question, zeroes get entered as their response because the constant sum boxes are populated by default with zeroes. When the survey is closed, this can be cleaned up relatively easily. Just wanted to let everyone know and thank ahmedA again!
It works. Of course. Thank you.I'll tell you where i went wrong. First, i don't know javascript. But second, i had an extra line at the top of the code that was this: Qualtrics.SurveyEngine.addOnReady(function () {And i'm guessing that is why it wouldn't let me leave without the "extra" closing bracket.In any case, thank you very much for trouble shooting this with me, and I apologize for wasting your time!Many Thanks,josh
I see, yes, it's working there. I found two problems after looking at your screenshots. 1- My next button isn't greying out like yours. 2- in the JS editor, I have an extra line of }); at the bottom of my code. and when i delete it and try to save, i get an error message that that there was an unexpected end to the code and it makes me go back and add it back before i can save and leave the JS editor.
I tried a fresh new survey. new item. pasted it into the part that should run when page is loaded, tried that as is. then tried deleting everything in the JS editor except your code. still didn't work. Does the code work for you when you test it?
It is not still working on the earlier question. It took me a bit before I went back and tested the earlier one because I couldn't believe it. I set that earlier one up as a test. with one question in front of it, one after it, and the constant sum question in the middle. Happy to provide whatever you'd need, but here's the preview link for that test: https://nace.iad1.qualtrics.com/jfe/preview/SV_3CKHJUuEnLobhEa?Q_CHL=preview&Q_SurveyVersionID=currentThanks,josh
I did not clear cookies or cache. will try that next. But i've had two people from separate computers test it and they found the same as me. If my respondents all have to clear cookies/cache for it to work, then that's not going to be a great fix.
Hi ahmedA , I hate to open this back up, but I am about to run a new survey next week and I just tested the code again and it doesn't seem to be working. Which, i know, is weird because i just copied the question to the new survey, and I also wrote a new question and copied the javascript code. Tried both ways, both ways don't work. There is no error message that pops up after trying to go the next page when the totals are anywhere between 1 and 99. It just lets the person advance. I went back to the original spot where it worked and now it doesn't give the error message there either. Any thoughts? I doubt anything changed on qualtrics' end. Thank you again for helping me work through this!
Yes, thank you - That was it! I had to remove the regular validation that I set up with the question originally. Thank you so much for your help!!Best Wishes,josh
Hi ahmedA, Thank you for your time and the code! Unfortunately, I must be doing something wrong, but I can't get it to work. When I try to advance to the next page, I get an error that I need to total the options to 100. I've tested it both in preview and after publishing the survey. I copy/pasted the code directly into the javascript code editor as in the pic posted below. Was I supposed to adjust anything? I also tried it in the code area for when the page loads, but I got the same error.Again, many thanks for your time and code!Josh
Hi mklubeck, Yes, that's exactly what I am trying to do. I tried to set up validation so that if all fields were empty, then it would validate, but I couldn't get it to work. So you might be on to something with allowing multiple values to validate. Thanks for trying and for the upvote!
Already have an account? Login
Enter your username or 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.