So You Want A Print Button On Your Nintex 2013 Form

SharePoint Versions: 2013
Nintex Versions: 2013

The Client Request
The client request sounded simple enough … add a Print button to the form to allow the user to designate a local printer and configure the number of copies, orientation, etc.

As Nintex provides the UI to add buttons of all types to perform the following actions (ie; Save, Cancel, Save and Exit), this effort shouldn’t take too long. As I quickly found out, the Print feature is NOT readily available as a delivered action.

Go Fish
As this is my first experience with Nintex Forms, I searched the Nintex site with keywords of “Nintex 2013 Print button” along with other keyword searches and the answer from the ‘community’ was a resounding “why don’t you (aka; Nintex) already provide this functionality?!?!

After searching the general web, the blog sites consistently showed partial solutions. It was like a movie trailer where just enough information was provided as a teaser with no guidance as to a workable real-world solution.

Keep Swimming
I searched for Nintex Form related videos on YouTube that would provide me some general learning opportunities.

I learned that there were two (2) types of settings on a form

  • Settings related to the general form
  • Control Settings for each section, control or area of a form

I also learned that the Nintex Framework supported the inclusion of jQuery as well as CSS and JavaScript.

The jQuery Solution
I found a great blog that provided the specific steps for downloading the current version of jQuery from the CodePlex.com site, for configuring the Settings within the Form as well as the Control Settings for the Print button.

These Console Log statements are helpful in verifying that the jQuery files are connected; add them to the Settings > Custom JavaScript section. Execute the form in an IE browser, select F12 to display the Developer Panel and verify the versions display in the Console Log view.

 console.log(NWF$().jquery);
 
 NWF$(document).ready(function(){
 console.log(NWF$().SPServices.Version());
 });

The thought of managing the jQuery library files for the long-term just for a simple Print Button feature just didn’t sit right with me.

For this requirement, I had a hunch that jQuery may NOT be necessary if the right JavaScript statement was used and included with the correct syntax.

The JavaScript Solution
I removed the jQuery include statements and the three (3) jQuery statements behind the Print button and simply retained the following statement behind the Print button:

window.print();

Next Steps
According to the ‘Voice of the Customer’ link below, Nintex may have more advanced Print functionality available in the next updates or releases.

Hopefully, this blog article will help someone needing this basic functionality until something better is available.

As  always, Enjoy Every Sandwich !

References
Add Print Button To Your Nintex Forms (Incomplete Solution)
Nintex JavaScript Basics
Nintex Printing Functionality (Voice of the Customer)

Advertisements
This entry was posted in Nintex, Tools. Bookmark the permalink.

One Response to So You Want A Print Button On Your Nintex 2013 Form

  1. Ems says:

    we look forward to nintex print functionality. Roadmap to this feature should be in place

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s