Nintex Forms : Print to PDF, hide the Control Buttons (Custom JavaScript Button)

If you wants to hide the Save, Cancel buttons while you printing your Nintex form, please follow the bellow steps
  • Add a new button to your form designer 
  • Go to "Control setting" of the Button 
Figure 1 : Custom Button Control Settings 

  • Add the Settings as above in the Figure 1
  • Use the below code for the Client Click field : NWF.FormFiller.PrintToPDF.PrintToPDF();
  • Add a CSS Class to the controls that you wish to hide during print command (Figure 2)
Figure 2 : CSS Class


  • Use the below CSS script on the form control settings
    • Nintex Form > Settings > Custom CSS
                @media print {
                .myButton {
                     visibility: hidden! important;
                          }
                }

Thanks Happy Coding ! 

Comments

  1. Thank you for providing this, I used it in a form and works perfectly!

    ReplyDelete
  2. Hello Shashika. I'm afraid this only works for Classic forms, which are being phased out. Responsive forms only allow buttons related to save, submit, or cancel, so the only way I've managed to get a PDF print of any kind is to put a hyperlink in a Rich Text control and set the URL to the JavaScript command. Problem then is that you have no control over where the print gets saved to - it dumps to your downloads directory and that's that. It appears the print to PDF function has been on the Nintex user voice for absolute ages, but clearly this is not a priority to them.

    ReplyDelete

Post a Comment