How to add a print button in the View Submissions area
To add a Print button to the Details area of your View Submissions Menu Item or RSForm!Pro Frontend List module you will need to:
-
Create a new RSForm!Pro View Submissions menu item(Menus > Main menu > New > RSForm!Pro > Submissions) or a new RSForm! Pro Module Frontend List module;
-
Define the layout for your listed submissions from the Row Layout option;
-
Edit the Details Layout field and add a normal button that will trigger the printing script:
<td><button onclick="printS();">Print</button></td>
The script will need to be added in the Details Layout field as well, between the <script type=text/javascript> </script> tags:
function printS() { child = window.open(window.location+'&tmpl=component', 'popupname','width=800, height=600'); child.setTimeout("window.print()",3000); }
This script will load the component in a new popup window, without your chosen template and will print the content of the pop-up window after 3 seconds
Instead of
child = window.open(window.location+'&tmpl=component', 'popupname','width=800, height=600');
child = window.open(window.location+'?tmpl=component', 'popupname','width=800, height=600');
20 persons found this article helpful.
You Should Also Read
How to enable submission confirmation HOT |
How to create a delete submission button in Manage directories |
How to modify the submission time stamp format, common format examples |