0
allow delete attachment by the submitter if status = new, otherwise remove delete attachment by submitter. (admins should have this option throughought the workflow. (so based on a group membership & status, show / hide delete attachment) Need same ability for add attachment (file attachments)

I'm assuming through Javascript we can add this?

Accepted Answer

Wednesday, June 13 2018, 12:17 PM - #Permalink
0
You can hide the Add File option on specific forms by using a custom form and unchecking the Add File option in the Tool Bar section at the bottom. Along with that you could use a form action that runs when the form loads and runs a javascript and put this in there.

$("[href*='attdelete']").hide()

That will just hide the delete icon from any existing attachments.
The reply is currently minimized Show
Responses (3)
  • Accepted Answer

    Tuesday, June 12 2018, 05:38 PM - #Permalink
    0
    I am sure there are probably ways that this can be done using jquery/javascript to hide the "delete" icon on attachments, but unfortunately I can't help you with that.

    Depending on your actual needs, a slightly left field option could be to use form actions to just hide the attachments section on the form when the Current user = Submitter and the State is New. At least that would stop them deleting attachments - but they wouldn't be able to see what attachments are actually attached (other than looking at the Change History).
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 13 2018, 07:32 AM - #Permalink
    0
    I might be able to do something with that. I'll have to think about how to show the attachment link outside of the expander. Maybe with a report.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 20 2018, 10:19 AM - #Permalink
    0
    I'm wondering if I'm missing something. this solution isn't working for me.

    I added a form action that executes a javascript on form load. I put the following as you stated above in the javascript to execute box. It does not appear to be working. I am using the workcenter interface, does that matter?

    $("[href*='attdelete']").hide()
    • Brian Amos
      more than a month ago
      Charity,

      Make sure to check the jquery checkbox on the Javascript tab of your form. It works fine in workcenter as well.
    The reply is currently minimized Show
Your Reply