How to show another question as popup within another survey question? | XM Community
Skip to main content
Question

How to show another question as popup within another survey question?

  • December 15, 2025
  • 1 reply
  • 28 views

Forum|alt.badge.img+1

Hello!

I have a question everyone sees that is like this: 

 

Click if you want to know more on  <button onclick="alert('Display question topA')">topic A</button> or <button onclick="alert('Display question topB')">topic B</button>.

 

How can I make the respective questions topA and topB to appear in the pop-up text? Both topA and topB are of Question type “Text/Graphic” (but contain only text). 

 

Any help highly appreciated. 

 

Edit: 

 

I tried <button onclick="alert(${q://QID9/QuestionText})">Topic A</button> and <button onclick={q://QID11/QuestionText}>Topic B</button> but both yield the 

Alert

 

1 reply

vgayraud
QPN Level 7 ●●●●●●●
Forum|alt.badge.img+59
  • QPN Level 7 ●●●●●●●
  • December 16, 2025

Hi,

You need to put your script in the question custom code, not in the html source.

You should have something like this: