Skip to main content
Nintex Community Menu Bar

Print button that also validates

  • Oct 30, 2017 5:16 PM UTC
  • 4 replies
  • 29 views
  • Translate All

dperani
Forum|alt.badge.img+5

We are trying to get a print button that will also validate before printing as we have some forms that still require a signature (cannot use workflow approval).  We have tried using windows.print() however we have issues with the form fitting on one page.  Either the right side is cuttoff or we use fitt to page and it is really small.  Also, it requires teh end user to not print the header and footer of the web page (cannot rely on them).

We have tried using the Print to PDF line  NWF.FormFiller.PrintToPDF.PrintToPDF(); this doesn't work well in that if all fields validate fine it does not go to the PDF since it is saving the form to the Sharepoint List/Library and it is now closed.  It only works if their is a required field that has no data....hmmm what else???

4 replies

Forum|alt.badge.img+1
  • Oct 31, 2017 9:04 PM UTC

Try adding this script to the button which will prompt the user to print. They can also SAVE the file as a PDF too.

function printMonsterForm()
{
var curURL = window.location.href;
//alert("curURL:"+ curURL);
curURL = curURL+"&isdlg=1";

var curWin = window.open(curURL);
}

Translate

Forum|alt.badge.img+17
  • Nintex Partner
  • Nov 1, 2017 12:49 PM UTC

Can you add a button control that has the setting to Cause Validation, and it call window.print? Also, you can set print media css using (at)Print media query to hide/move areas of the form. CSS3 Media Queries 

Translate

dperani
Forum|alt.badge.img+5
  • Author
  • Scholar
  • Nov 6, 2017 8:14 PM UTC

Hi Dheeraj,

Where is the print command called?

Dawn

Translate

Forum|alt.badge.img+17
  • Nintex Partner
  • Nov 8, 2017 4:31 PM UTC

The javascript button would call the window.print.

Translate