Hi All,I am running into an issue with Setting Embedded Data via Javascript and then using it in branches & display logic.In Q1, I am randomly assigning participants into control or intervention groups using the following code:************Qualtrics.SurveyEngine.addOnload(function(){ var rnd = Math.random(); if (rnd >.5) { Qualtrics.SurveyEngine.setEmbeddedData("InterventionStatus","Intervention"); } else { Qualtrics.SurveyEngine.setEmbeddedData("InterventionStatus","Control"); }});************Based on the answer to the question of Q2, I am assigning a value to embedded data code:************Qualtrics.SurveyEngine.addOnUnload(function(){ if (this.getChoiceRecodeValue(this.getSelectedChoices()) == 0) { var age = 1; } else { var age = 0; } Qualtrics.SurveyEngine.setEmbeddedData("U18",age);});************The issue I am having is that after this question is done, I am branching to one of four different survey questions. Instead of branching, it is going directly to the end of the sur
Hi, I am trying to customize a form question to include different types of inputs (i.e., drop down, multiselection). I have figured out to create a multiselection that requires ctrl to be held, but find it is not very user friendly. What I really would like is to do is have several checkboxes. Here is my currently code for the multiselection box. Can you help me adjust to checkboxes? var element=' <select class="js-example-basic-multiple js-states form-control" id="id_label_multiple" multiple="multiple"><option value='Nobody'>Nobody</option><option value='Sibling'>Sibling</option><option value='Parent'>Parent</option><option value='Friend'>Friend</option></select>'; jQuery(element).insertAfter("#"+that+" .InputText:eq(3)"); jQuery("#s3").on('change',function(){ jQuery("#"+that+" .InputText:eq(2)").val(jQuery("#s3 option:selected").text()); }); Thanks, Andrew
I am trying to setup a Qualtrics survey that inserts custom text into a matrix question (written by javascript). The issue is that I have multiple languages. How do I use if statements to determine the language that the survey is being completed in? I am using the drop down at the top, so it can be changed any time. The code will be something like so (IF STATEMENTS ARE WHAT I NEED HELP WITH): Qualtrics.SurveyEngine.addOnload(function() { IF Language is set to English: var newRow = $('<tr class="Choice"><th class="Choice"><span class="LabelWrapper"><label><strong>Travel to and from School</strong><BR>Note: walking to and from school counts as 2 times.</B></label></span></th><td class="c2 BorderColor"></td><td class="Separator2 BorderColor c3"> </td></tr>'); newRow.insertBefore ($('#QID58 tr:nth(4)')); var newRow2
Hi all, I have a really weird problem happening with 5 questions we have developed using Google API. I have a series of mapping question in our survey that are "text entry" where location is identified by a participant and the XY coordinates are supposed to be placed in the text entry box. I have 1 surveys that works perfectly but the other three surveys (which are copied from the original one) has the first question working perfectly, but the 2nd through 5th questions do not show the map (just the text box where the coordinates are supposed to go). This issue happens for participants (as I have no XY coordinates for questions 2 - 5), but when I (and the qualtrics reps) try to replicate the issue, the survey works perfectly fine! See the attached files to see the code for WorksPerfectly & DoesNotWork. Any ideas? I have also attached the survey link to an identical one so you can test: https://westernsocialscience.eu.qualtrics.com/jfe/form/SV_cOpkBW80zNnTCMR - The questions are in
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.