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

Brief flash of the button while trying to hide it

  • July 21, 2020
  • 9 replies
  • 119 views

Forum|alt.badge.img

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

SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • July 21, 2020

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.


Forum|alt.badge.img
  • Author
  • July 21, 2020

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


SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • July 21, 2020

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)


Forum|alt.badge.img
  • Author
  • July 21, 2020

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


Forum|alt.badge.img
  • Author
  • July 21, 2020

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


SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • July 21, 2020

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');
});



Forum|alt.badge.img
  • Author
  • July 22, 2020

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 ..☹️


Forum|alt.badge.img
  • Author
  • July 22, 2020

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


Forum|alt.badge.img
  • Author
  • July 23, 2020

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