Skip to content
Menu
SharePoint Gems
  • Power Platform
  • Development
    • SharePoint 2013
  • Migration
  • Administration
  • SP Online
  • Contact
  • About
    • Privacy Policy
SharePoint Gems

Nintex Form – Add Print Button

Posted on September 7, 2021September 29, 2021

Hello SharePointers,
Today we are going to see How to add Print button in Nintex Form. In ​Nintex Forms – Add Quick and Easy Print Function is very easy. To do that just follow below steps.

Nintex Form - Add Print Function
Contents hide
1 ​Nintex Forms – Add Quick and Easy Print Function
2 Instructions to Add Print Function in Nintex Form
2.1 Share this:
2.2 Like this:
2.3 Related

​Nintex Forms – Add Quick and Easy Print Function

This JavaScript allows you to quickly and simply print the form and fields including formatting.

Instructions to Add Print Function in Nintex Form

  1. Edit the form
  2. Add a Button
  3. Change the button type to “JavaScript”
  4. Set JS function to “PrintRequest()” (minus double quotes)
  5. Edit Form Settings
  6. Add the following JS to the Javascript Section
function PrintRequest(){
var formInfo = document.getElementById("ctl00_ctl67_g_daea14f1_4135_4ea3_a9fc_fbe9bfbf182e_ctl00_ListForm1_MiddleDiv").innerHTML;
var htmlBody = "<!DOCTYPE html>" +
"<html>" +
"<head>" +
"<title>Lab Request</title>" +
/*"<title>" + getTextBoxFieldValue(".cssTitle", txtTitle) + "</title>" + */
"<link rel='stylesheet' href='https://one.belden.com/_layouts/15/1033/styles/Themable/corev15.css?rev=WBDzE8Kp2NMrldHsGGXlEQ%3D%3D'>" +
"<link rel='stylesheet' href='https://one.belden.com/_layouts/15/NintexForms/themes/base/Filler.css?v=2.11.8.30'>" +
"<style>body{overflow: auto !important; margin:0px; padding:0px; font-family:Tahoma,Helvetica,Arial,sans-serif; font-size:13px; background-color:white;}.nf-button{visibility:hidden;}</style>" +
"</head>" +
"<body>" +
"<div id='mainDiv'>" +
formInfo +
"</div>"+
"</body>"+
"</html>";

Print(htmlBody);
}

function Print(htmlBody){
var xMax = 1024, yMax = 768;
if (document.all) {xMax = screen.width; yMax = screen.height;}
else if (document.layers) {xMax = window.outerWidth; yMax = window.outerHeight;}

var WindowObject = window.open('', '', 'width=' + xMax + ',height=' + yMax + ',toolbars=no,scrollbars=yes,status=no,resizable=yes');
WindowObject.document.write(htmlBody);

WindowObject.document.close();
WindowObject.focus();
setTimeout(() => { WindowObject.print(); }, 1000);

}

7. Add rule to the button to disable onnew & onedit
8. Publish it

By this way you can add a Print button in Nintex Forms.

Hope you like this article, If yes, then please share your feedback in comments.

You may also like our other posts.

  • SPFx Interview Questions
  • PnP PowerShell to get all Site Collections
  • Check date field is empty in Nintex Workflow

Nintex Form – Add Print Button

Share this:

  • Print
  • Twitter
  • Facebook
  • LinkedIn
  • WhatsApp
  • Telegram
  • Pinterest
  • Reddit

Like this:

Like Loading...

Related

Leave a ReplyCancel reply

  • Development
  • Migration
  • Poweer Apps
  • Power Automate
  • Power Platform
  • SharePoint 2013
  • SharePoint Administration
  • SharePoint Online
  • Tips
  • Uncategorized

Best of Computers

Blog Stats

  • 67,509 hits

Subscribe

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,433 other subscribers
Buy Me Coffee
©2025 SharePoint Gems | Powered by WordPress and Superb Themes!
%d