Display Question ID (as Piped Text?) in Header | XM Community
Skip to main content
Solved

Display Question ID (as Piped Text?) in Header


Forum|alt.badge.img+3

Hi! For some reasons I would like to show my question ID in the header (in very small characters below the question and less remarkable to the participants). I tried to do it by inserting a Piped Text in the Header section of Look&Feel but could not find the according field name for the question ID. Is there any way to do it? Many thanks!

Best answer by rondev

Use the below code in header with Show Question number enabled.

<script>
Qualtrics.SurveyEngine.addOnReady(function()
{var det_elem = jQuery(".ExportTag").detach();jQuery("#Footer").html(det_elem).css({"text-align":"center","font-size":"smaller"});});
</script>

 

View original

8 replies

JesperAndersen
QPN Level 4 ●●●●
Forum|alt.badge.img+11
  • QPN Level 4 ●●●●
  • 92 replies
  • July 25, 2023

I don’t think you can do this with piped text. But since this would be a fixed value for each question, does it have to be piped text? Can’t you just add it manually?


Forum|alt.badge.img+12
  • QPN Level 3 ●●●
  • 38 replies
  • July 25, 2023

you can use javascript code and insert the pipetext there in header/footer of theme option.


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • 11 replies
  • July 25, 2023

OK. Its a bit complicated to explain. I could just activate “show question number” in the settings. But is there any way to modify the font and position of this question number? I don’t want it to be displayed in front of the question. I need it somewhere at the bottom of the page and in small characters… I guess there should be a way to do it with Java but I am not familiar with it...


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1449 replies
  • Answer
  • July 25, 2023

Use the below code in header with Show Question number enabled.

<script>
Qualtrics.SurveyEngine.addOnReady(function()
{var det_elem = jQuery(".ExportTag").detach();jQuery("#Footer").html(det_elem).css({"text-align":"center","font-size":"smaller"});});
</script>

 


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • 11 replies
  • July 25, 2023

@rondev Oh great, thank you so much!


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • 11 replies
  • July 27, 2023

@rondev Sorry for asking again. In my survey I need a logo and a text in the footer. Here is its code:

<table border="0" cellpadding="1" cellspacing="1" height="96" width="705">
	<tbody>
		<tr>
			<td><img height="83" src="https://MyURL" width="192" /></td>
			<td>MyText</td>
		</tr>
	</tbody>
</table>

Additionally, I need the question ID below or above this. If I add your script in the header section, I get the question ID but the logo in the footer disappears completely. Is there any way to have both - the footer+text and the question ID? Many thanks in advance!


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • 1449 replies
  • July 27, 2023

Use the below code in header with Show Question number enabled.

<script>
Qualtrics.SurveyEngine.addOnReady(function()
{var det_elem = jQuery(".ExportTag").detach();jQuery("#Footer").append(det_elem).css({"text-align":"center","font-size":"smaller"});});
</script>

Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • 11 replies
  • July 27, 2023

@rondev Thanks!