This code works beautifully!I am wondering if it is possible to combine this with some code for a default choice based on an embedded data field?For example, the code below works for a a standard drop-down question:Qualtrics.SurveyEngine.addOnReady(function(){/*Adds default to dropdown question choice based on embedded field*/var select = jQuery("#"+this.questionId+" select");if("${e://Field/track}" == "Alt 1") select.val("1");if("${e://Field/track}" == "Alt 2") select.val("2");if("${e://Field/track}" == "Alt 3") select.val("3");if("${e://Field/track}" == "Alt 4") select.val("4");if("${e://Field/track}" == "Alt 5") select.val("5");});Would there be a way to combine it with the code to add a dropdown to a form question? (I am adding the code shared in this thread below for convenience so people don't have to download and import the qsf file)Qualtrics.SurveyEngine.addOnReady(function(){/*Creates dropdown lists for form text entry boxes*/var that=this.questionId;var element="Entry 1 Entry
In case anyone needs something similar, here's the solution: Qualtrics.SurveyEngine.addOnload(function() { var input = jQuery("#"+this.questionId+" .InputText"); var l = input.length; function upscore(){ var s = 0; input.each(function(){ s = s + parseFloat(jQuery(this).val())||0; }); jQuery("#total").text((Math.round((parseFloat(s/l))/0.5)*0.5).toFixed(1)); } upscore(); input.css({"text-align":"center","width":"6em"}).attr("inputmode","numeric"); input.on("input", function() { this.value = this.value.replace(/[^.0-9]/g,""); if(this.value>10 || this.value
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.