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:

  1. 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;

  2. Define the layout for your listed submissions from the Row Layout option;

  3. 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

Note: If you are using SEF URLs for your site's pages you will need to make a slight adjustment to the script:
Instead of
child = window.open(window.location+'&tmpl=component', 'popupname','width=800, height=600');
you will need to use
child = window.open(window.location+'?tmpl=component', 'popupname','width=800, height=600');

20 persons found this article helpful.


Was this article helpful?

Yes No
Sorry about that

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