Script: Add a Print Button
This article will help you Add a Print Button
Background
You may need to add a print button to a survey so respondents can easily print out items.
- Examples of why you would need to do this are:
- If you have rules for a contest or giveaway
- You are providing gift codes and want the respondent to be able to print it so they do not forget
Adding a Print Button
- Turn on the ability to print on the specific page you need this functionality on.
- See Article: Printing: Control the Ability to Print
- Access the 'Build & Edit' Tool for Authoring/Programming and open the question card for the specific page you want to add the print functionality to.
- Click on the HTML Editor icon tied to the question card you wish to display the Print button
- Access the Source Code Editor (</>)
- See Article: Source Code Editor
- While in the Source Code Editor, add the following code in the location desired and update the print button text as needed
<button onclick="myFunction()">CLICK HERE TO PRINT</button> <script> function myFunction() { window.print(); } </script>
- You are done. Make sure to test and adjust accordingly, if needed.