jQuery: Add Button to div#Buttons | XM Community
Skip to main content
Is there a simple way to add a custom button to the #Buttons div? I'm sure I saw a post with jQuery or Qualtrics Javascript API instructions, but now I can't find it.
Found the article. This code adds a test button. The value attribute is what displays as the button's text.



Qualtrics.SurveyEngine.addOnload(function() {

jQuery('#Buttons').append('<input id="TestButton" class="NextButton Button" title="Test Button" type="button" name="TestButton" value="TestButton" data-runtime-disabled="runtime.Disabled" data-runtime-aria-label="runtime.ariaLabel" data-runtime-hide="runtime.Hide" aria-label="Test Button">');

});



Here is the original article with a different example of using jQuery to append and clone:

https://www.qualtrics.com/community/discussion/1431/floating-submit-button



Note: you might need to add css to make the appended button look like the others.

Leave a Reply