Brief flash of the button while trying to hide it | XM Community

Brief flash of the button while trying to hide it

  • 21 July 2020
  • 9 replies
  • 67 views

Userlevel 2
Badge

Hi everyone,
In my survey there is a section where I am interested in hiding the "NEXT" button, as the progress is automatic.
I was able to hide the button thanks to TomG, by writing a script in the header, and inserting embedded data in the survey flow. However, there is still a brief flash of the buttons in the transition between the displayed images.
I would be very appreciate if anyone knows how I can hide this button so that in that part the button will not show at all.
Many thanks.


9 replies

Userlevel 5
Badge +4

Add the below code in Look & Feel ->General -> Header -> Source, it will hide all type of flashing on every screen globally. This will hide your next button flashing as well.
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery('.QuestionOuter').css('visibility','hidden')
});


Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('.QuestionOuter').css('visibility','visible')
});
If this doesn't work, then just replace the .QuestionOuter with #Wrapper and add the above code at question level instead of globally.

Userlevel 2
Badge

Does the code delete the button from the entire survey?
Because there are parts I do need it to show up.

Userlevel 5
Badge +4

The above code doesn't delete anything, this is just avoid flashing on screen (in your case, flashing appearing on next button before getting hidden)

Userlevel 2
Badge

Ok, thanks for the detailed answer. I'll try it

Userlevel 2
Badge

I ran the code and when I open the survey, it just does not work.
The screen is white and blank.

Userlevel 5
Badge +4

If you are looking for the code where you want to hide the next button then you can simply use,
jQuery("#NextButton").css('visibility','hidden')
To display the next button you can use,
jQuery("#NextButton").css('visibility','visible')
if you want to hide the screen and flashing you can use the below code,
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('.QuestionOuter').css('visibility','hidden')
jQuery('#Wrapper').css('visibility','hidden');
jQuery('#Wrapper').css('opacity','0');
});


Userlevel 2
Badge

This is the code that hide the button:

now I want only to hide the flashing.
I tried the codes you wrote and it did not work ..☹️

Userlevel 2
Badge

As I write this (below), the flashes disappear, but the button continues to be hidden even after the blocks where it should be. That is, it does not reappear on screen. This is after I set in the survey flow to return to the previous state (hideButton = 0)
image.png
image.png

Userlevel 2
Badge

I still could not hide the flashes
I would really appreciate any help...

Leave a Reply