Insert print page button between question text and answers | XM Community
Skip to main content
Question

Insert print page button between question text and answers

  • January 14, 2022
  • 1 reply
  • 193 views

camillelothe

I need to create a consent form for a survey. I want to give the respondents the option to print the consent form. To do this, I inserted a button over the Java Script editor.
This is the code:
jQuery('#Buttons').append('

');
However, I would like the button to appear between the question text and the multiple choice answer. At the moment the button is appearing at the end of the page. I already tried to change «append» to «before».
Could anyone help me to change the code? Thank you!

1 reply

Forum|alt.badge.img+8
  • Level 2 ●●
  • January 17, 2022

Hi camillelothe
Please try below code and let me know how it goes.
var $this = jQuery(this.questionContainer);
jQuery('.QuestionText', $this).append('

');