Qualtrics.SurveyEngine.addOnReady(function(){ /*Place your JavaScript here to run when the page is fully displayed*/ var that = this; jQuery("input[type*=checkbox]").on("click",function() { var el = jQuery(this); setTimeout(function(){ enDB(); },50); }) enDB(); function enDB() { if( jQuery("input[type*=checkbox]:checked").length>0 ) { jQuery("input[type*=radio]").each(function() { var rowID = jQuery(this).attr('id').split('~')[2]; var scaleID = jQuery(this).attr('id').split('~')[3]; that.setChoiceValue(rowID,scaleID,0) }); jQuery("input[type*=radio]").parent().attr("disabled","disabled").css({"pointer-events":"none","background-color":""}); jQuery("input[type*=radio]").attr("disabled","disabled").css("pointer-events","none"); } else { jQuery("input[type*=radio]").removeAttr("disabled").css("pointer-events",""); jQuery("input[type*=radio]").parent()
DaveW Hi buddy, i am facing similar problem with my code where jquery is working fine if Qualtrics fraud detection security i.e. Bot Detection using reCAPTCHA, Security scan monitor and RelevantID features are off but the moment I enable any of these features then my code stops running.can you please let me know how you fix the issue?
rarcega, were you able to solve above mention problem because I am also getting the same problem?I reached out to support but they also have no idea. TomG , I tried the way you suggested but page is not advances to next screen automatically rather one has to click on next button to move forward to next question. any suggest to resolve this?
No Worries Jamamel .Please do reach out to me in case you need any further help. :)
@Jamamel, show ranking question first and add "Don't Know" option after ranking question on same page. Now add display logic in Ranking question i.e. show this question only if "Don't know' not selected and click on "In Page (In Page Display Logic may be incompatible with Forced Responses)" property as well. Now, when you test the survey, respondent will see Ranking question along with "Don't Know" and it will ask respondent to provide rank in ranking question when you click next without answering anything. If you click on "Don't know" then ranking question will get hide and you can move forward to next question. Please let me know if this helps or do you have any query?Note: I find it best approach because doing so you don't need to add custom validation and default validation of Qualtrics will take care of all ranking validations.
Hi AdamK12 No worries Buddy and don't be sorry:)
Hi AdamK12 ,Thanks for your response buddy. The problem is that respondent can either rank options or select "Don't know" or "None". Respondent can not select "Don't Know" and rank options as well together. If I put specify "None" and "Don't know" inside items then it is possible that respondent drag these two options along with other options as well. Hope you understand my question here.
Hi ahmedA , I am not well versed with Javascript so can you please share some code so that I can get some idea?
Thanks grahulp5 :)
Thanks TSAcc
Thanks a lot rondev for your help here. It worked.
ahmedA , can you please share one example how to use it in Qualtrics. I have Q1 with two options 'Yes'/'No'. in Q2 I need to show different question text based on Q1 selection i.e. there is different question text if Q1 = 'Yes' and there will be another question text if Q1 = 'No'.
Thanks Suraj. I managed to find solution for this as well. :)I got this using below code. this.questionclick = function(event,element){ var selectorChecked = jQuery("input[type=checkbox]:not(input[id='QR~QID172807693~6']):checked").length; if (selectorChecked > 0) { if (selectorChecked == 5) { this.setChoiceValue(6,1) } } }
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.