cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Disable print button while printing forms

Hello Friends,

In our Nintex application, we don't have "Print to PDF" action enabled due to which I'm following this approach to print the documents Print Button - Nintex Forms

This is working perfectly for us. However, I would like to know if there's a way to make the Print button disappear when the document is printed.

Thank you.

Tags (2)
Reply
17 Replies
Highlighted
Automation Master
Automation Master

Re: Disable print button while printing forms

My idea would be to not use the window.print() function directly on client click but to use a custom function.

In that custom function you can first hide the button with css/jquery and then call the window.print() inside your custom function.

Could that be working for you?

Cheers

Philipp

Reply
Highlighted
Automation Master
Automation Master

Re: Disable print button while printing forms

So after the form is printed for the first time, you want the print buttons to not show? I'm sure you are ok with browser printing though correct?

Reply
Highlighted
Not applicable

Re: Disable print button while printing forms

Philipp Lucas yes that is what I want. Could you please suggest how to do that?

Andrew Glasser after I select the Print button, I shouldn't see that button on the print

Reply
Highlighted
Automation Master
Automation Master

Re: Disable print button while printing forms

I see two possibilities. Either you have a JS function like Philipp says and it will update a field on your list item to record that the print occurred. This can be done using CSOM code. This is a little challenging and examples are out there to do so. But this option is best because it will work on the form no matter the display mode.

user opens form in Display mode or any mode, you allow the button to be visible because a rule on the form knows that the "print" field ( a yesno field you add to the list to track this) on the list item and has no value. User clicks on the button, JS function updates the list item and sets a value to "print" field then does a window.print. User closes the form. Next time the form is opened, the form rules hide the button based on the value in the "print" field on the list item. Don't show this field on views for the user.

You can also do this using a Choice control on the form. Make it show as a button format. Set the client name for this control so a variable is set for it and can be referenced in the JavaScript section in the form settings. There, set a client click event for the button and have the window.print. Also have a form rule that disables the choice control based on the ITEM's value of Print field, not the controls value (this is so the button doesn't disable before the form is saved). Now a print will occur, the user must click save on the form, and the next time they can't print. This will only work if the user edits the form.  You can see there will be issues with this last approach.

There are most likely other ways, but you will have to persist that someone did print so it can't be done the next time the form is opened.

Reply
Highlighted
Not applicable

Re: Disable print button while printing forms

Andrew Glasser​: Thank you for the suggestions. I'm pretty new to JavaScript and all. Is it possible that you could provide the code? Thank you

Reply
Highlighted
Automation Master
Automation Master

Re: Disable print button while printing forms

Yes, I would love to. I was working on a blog for it, but my tenant is having issues that I'm trying to resolve. When I get that fixed, I'll get back to it. 

Reply
Highlighted
Nintex Newbie

Re: Disable print button while printing forms

How do you do that? I have the print button working, but how do I get it to not print the "print" button on the physical paper form.

Reply
Highlighted
Automation Master
Automation Master

Re: Disable print button while printing forms

Hi Emily,

you can give your button a custom css class like "no-print". Afterwards you go to your form settings -> "Custom CSS". There you will already find the following area, where you can simply add your new class to and it will look like this:

This will hide your button on the printed form.

Regards

Philipp

Reply
Highlighted
Automation Master
Automation Master

Re: Disable print button while printing forms

Sorry I have not responded, but has a solution been put in place since?

0 Kudos
Reply