cancel
Showing results for 
Search instead for 
Did you mean: 
david74
Nintex Newbie

Disable add attachment button in Nintex Forms

Jump to solution

Hi,

I have a form with Attachments area. I have disabled the attachment area depending on a rule. It seems to work, because the area is grayed out, and the two buttons "Add attachment" and "Delete" seems to be grayed out too. If I left click on both buttons, nothing happen, which is great.

The problem is if you do a right click on one of these button...If you right click on "Add attachment", and select "Open", the popup for adding attachment is displayed.

Is there a way to solve this bug ?

Thank you four your help


David

0 Kudos
Reply
5 Replies
inimri
Nintex Newbie

Re: Disable add attachment button in Nintex Forms

Jump to solution

if i don't want attachments in this form, i would remove it from the form itself.

select the title and the control and click the magical button "delete".

0 Kudos
Reply
mapeacock
Nintex Newbie

Re: Disable add attachment button in Nintex Forms

Jump to solution

David,

You could also add the Attachment control to a panel and conditionally hide the panel, based on the same conditions that you have placed on your attachment control. I assume that there are conditions under which you would like to have people add attachments, hence not deleteing the control altogether.

Cheers,

Mark

Reply
david74
Nintex Newbie

Re: Disable add attachment button in Nintex Forms

Jump to solution

Hi Mark, thank you for your answer.

I don't want to hide the whole Attachment control, just the two buttons "Add Attachment" and "Delete". I just want to give some restricted contributors the right to read the attachment, but not the right to delete it. or add a new one.

Thank you again

David

0 Kudos
Reply
Automation Master
Automation Master

Re: Disable add attachment button in Nintex Forms

Jump to solution

‌ did you resolve this in the end?

0 Kudos
Reply
Highlighted
david74
Nintex Newbie

Re: Disable add attachment button in Nintex Forms

Jump to solution

Hi,

yes I handle it with CSS/JS

First you need to apply all Nintex rules in you form.

Then hide all attachments links by adding this in your CSS code

.nf-attachmentsRow .nf-attachmentsLink[disabled="disabled"],
.nf-attachmentsRow .propertysheet[disabled="disabled"] {
display: none !important;
}

Finally add this JS in the JS part of your form to enable the "add attachment" button

function enableAttachmentLink(isDisabled){
   NWF$("table.nf-attachmentsTable td.ms-vb > a").removeAttr("disabled");
}
 
NWF$(document).ready(function(){

 NWF.FormFiller.Events.RegisterAfterReady(function(){ 
     setTimeout(enableAttachmentLink(true), 900);
  });
})

hope this helps ?

View solution in original post

0 Kudos
Reply