Skip to main content
Nintex Community Menu Bar

Print button that also validates

  • October 30, 2017
  • 4 replies
  • 22 views

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
  • October 31, 2017

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);
}


Forum|alt.badge.img+17
  • Nintex Partner
  • November 1, 2017

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 


dperani
Forum|alt.badge.img+5
  • Author
  • Scholar
  • November 6, 2017

Hi Dheeraj,

Where is the print command called?

Dawn


Forum|alt.badge.img+17
  • Nintex Partner
  • November 8, 2017

The javascript button would call the window.print.