Custom Submit Button Color | XM Community
Skip to main content

Hello
I am trying to find out how to change the color of only the "submit" button. In my survey the button is labeled "Customer Care Only". Here is the coding.
Can someone help me with how to change the color, please and thank you.
Qualtrics.SurveyEngine.addOnload(function()
{
Qualtrics.SurveyEngine.addOnReady(function() {
var newName = 'Customer Care Only'; //Update - New Next Button label
var lastLoopOnly = true; //Last loop only? Value doesn't matter to non-loops
//No changes below
if(!lastLoopOnly || "${lm://CurrentLoopNumber}" == "${lm://TotalLoops}") {
var nb = jQuery('#NextButton');
nb.val(newName);
nb.attr('title', newName);
}
});

});

Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/

});

Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/

});

RyanBrickman
You can update one line in your code
jQuery('#NextButton')[0].style.background='black';
Hope it helps!


Leave a Reply