How can I add a print button to the survey? | XM Community
Solved

How can I add a print button to the survey?

  • 29 October 2019
  • 10 replies
  • 411 views

Hello all,

I know that this has been asked a few times now, but previous answers don't seem to be working for me. I am trying to include a print button at the very end of the survey to print the last page. The last page has a set of skills that pop up through display logic depending on previous answers, and I would like participants to print the set of skills. Is there any custom code (html) that might work?

Thank you for your help!
icon

Best answer by Igee 30 October 2019, 19:13

View original

10 replies

Userlevel 2
Badge +1
@Yeon - you can use a jQuery code as below in the JS section of a question:
!
@Igee - So I put that code in, but when I run a preview, it does nothing when I click the button. Does this function only work on certain browsers? Or is something blocking it? Thanks for your help!
Userlevel 2
Badge +1
@Yeon - where have you added this piece of code? have you added it to the "addOnload" function in the JS and also are you using a jQuery append? as without the jQuery append this code will not work.
@Igee - I am not very familiar with Javascript, how do I use a jQuery append? I had it added in "addOnload", but I didn't do anything with jQuery. Thanks again!
Userlevel 2
Badge +1
@Yeon - you can use the following, this should work on Chrome and Firefox, hope this helps!

!
@Igee - It worked perfectly! Thank you so much for all your help, appreciate it.
Badge

may I ask one of you to post this solution in text format? I tried typing all the characters in and I'm getting an error message. I don't know JS so I probably mistyped a simple but important thing.
image.png

Userlevel 1
Badge +5

https://community.qualtrics.com/XMcommunity/discussion/comment/31526#Comment_31526Qualtrics.SurveyEngine.addOnload(function()
{
            jQuery('#Buttons').append('

');
});

Userlevel 1
Badge +5

https://community.qualtrics.com/XMcommunity/discussion/comment/19221#Comment_19221Is there a way to insert the button in another place on the page? I want it after a particular question

Badge

Thank you thank you thank you!!!

Leave a Reply