Hide the choice and have stars all the way to left | XM Community
Skip to main content
Question

Hide the choice and have stars all the way to left

  • December 11, 2023
  • 20 replies
  • 237 views

Forum|alt.badge.img+3
  • Level 3 ●●●
  • 67 replies

Hello everyone, 

I need some help as I am currently trying to create a survey, as you can see below I would like to hide the choice label and just have the stars all the way to the left I think I can do it with JavaScript but I am not an expert can someone please help.

 

 

20 replies

MattiasM
Level 5 ●●●●●
Forum|alt.badge.img+63
  • Level 5 ●●●●●
  • 328 replies
  • December 11, 2023

Good afternoon from a rainy Sweden!

If you just do a space (underscore), the label will go away. The stars will not be at the very left still, but there is at least no text there. 

 

At least a partial solution :) 

 

All the best

-Mattias

 


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 11, 2023

Hello @MattiasM 

I am using this Javascrprit below in order to have the stars all the way to the left but it create a huge space between question label and stars is there anyway to reduce the gap  : 

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" tr").each(function() {
var row = jQuery(this);
var th = row.before("<tr></tr>").find("th").attr("colspan","4").css("text-align","left");
row.prev("tr").append(th);
});
});

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 11, 2023

@Tata C,

Use this instead:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" th").hide();
});

 


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 11, 2023

Ok many thanks @TomG I’ll try this :)


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 12, 2023

Hello @TomG @MattiasM 

In this survey I activated the “Autoadvance on Questions and pages” in Motion in Look and feel, which enables a back button do you guys know if I can use any JavaScript to hide the back button I don’t want respondents to be able to go back. 

 

Thanks for your help. 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 12, 2023
Qualtrics.SurveyEngine.addOnReady(function() {
this.disablePreviousButton();
this.hidePreviousButton();
});

 


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 12, 2023

Many thanks @TomG !

 

Do you know where should I insert this JavaScript ? 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 12, 2023

If you want it to apply to the entire survey, add it the the survey header inside a <script> tag.


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 12, 2023

Hello @TomG 

You mean here ? 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 12, 2023

Yes


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 12, 2023

Ok @TomG 

Thank you so much for your help !


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 12, 2023

Hello @TomG 

In my survey I have many “In page” display logic (see below) and I have this message in red saying “In Page display Logic may behave unexpectedly with validation option” but when I test the survey I don’t see nothing wrong, would ou advice to pay attention to this message anyway ? 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 12, 2023

If it works correctly, you can ignore the warning.


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 12, 2023

Hi @TomG it’s me again ahah

I have a question on my questions that have “In page” display logic I have a CTA (Call To Action) button that appears but I don’t know why do you know maybe why  I have this (see below) : 

 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 12, 2023

No, I don’t.


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 13, 2023
Qualtrics.SurveyEngine.addOnReady(function() {
this.disablePreviousButton();
this.hidePreviousButton();
});

 

Hello @TomG 

I tried this JavaScript and add the <script> at the begginning and and of the Javascript but unfortunately it doesn’t hide or disable the back button. Do you know why please ? 


vgayraud
QPN Level 6 ●●●●●●
Forum|alt.badge.img+58
  • QPN Level 6 ●●●●●●
  • 552 replies
  • December 13, 2023

Add it like this, and be sure to be in “source” mode.

As for why your “Terminé” button appears, it’s linked to your auto-advance options (combined with inpage display logic). Try checking the “hide” auto-advance button :

 


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 13, 2023

Hello @vgayraud 

Many thanks for your answer, I’ll try this :)


Forum|alt.badge.img+3
  • Author
  • Level 3 ●●●
  • 67 replies
  • December 13, 2023

@vgayraud I have stars rating questions in my survey and because of my background image I feel like we don’t see the stars really well, do you know by any chance how I can highlighted them or put square around them ? 

 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • December 13, 2023

@Tata C,

‘this’ refers to the current question object and isn’t set when the script is run from the header. You can use jQuery(“#PreviousButton”).hide(); instead.