Disable previous button in combination with other JavaScript | XM Community
Skip to main content
Question

Disable previous button in combination with other JavaScript

  • March 19, 2020
  • 0 replies
  • 17 views

PaulSchreuder72
Hi, I have a question(set) in my survey which already contains the following Java Script: /*Place Your Javascript Below This Line*/ var questionText = "${lm://Field/1}"; // "${lm://Field/1}" will actually evaluate to //whatever is Field 1 in the current Loop & Merge loop. // You can do this with embedded data too, as seen in the next line var order = "${e://Field/preorder}"+ questionText; // gets the value of the embedded data // field "preorder", concatenates the current loop's identifier to it, //and stores that as a variable Qualtrics.SurveyEngine.setEmbeddedData('preorder', order); // updates the //embeddeddata field "preorder" to be our order variable, which has the current loop's //identifier attached, effectively constructing a string of numbers representing the order I would like to disable/hide the PreviousButton for each of the 20 statements that appear after one another in this question. I think the JavaScript for this is: Qualtrics.SurveyEngine.addOnReady(function() { $('PreviousButton').hide(); $('PreviousButton').disable(); }); My question is: Where/how should I write the command for this in combination with the other Java Script? If you could show me how to do this it would be really helpful, thank you!