Adding a button that displays additional text (Qualtrics Survey) | XM Community
Skip to main content

Hello,
For a survey in Qualtrics I would like add a button below a few of my (open essay text) questions that uses can click to receive further instructons or hints (such as a text with a few examples, or ideas about what to write). This would only be one button per questions (or something similar such as a checkbox "show examples")
To my unterstanding something like this is possible through a combination of html code and java script.
I've followed this thread, but had no success. In fact, clicking on the example provided in their accepted answer, I don't see any button with text, so this example might be outdated?
https://www.qualtrics.com/community/discussion/1956/insert-a-button-that-gives-a-pop-up-additional-information-window-when-clicked

Any tips on how to approach this problem? And where exactly do I have to place the java script?

I believe the example has some javascript error if you open the console, you can see it.
but to answer your question, "where exactly do i have to place the javascript"

Put the above in Look and Feel (section), General (tab), Header (input), edit (link), Source (icon, look like )
Is this what you want CSonn ?
Put the above in the question's title, HTML View (tab)
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery( "#btn1" ).click(function() {
jQuery("#dialog").dialog( "option", "modal", true );
jQuery("#dialog").dialog( "open" );
});
Put the above javascript code in the Question, Gear (icon on the left), Add JavaScript... (menu item)


Leave a Reply