You are viewing limited content. For full access, please sign in.

Question

Question

Locking form from being changed after a signature has been added

asked on October 8, 2018

Hi All,

 

Was wondering if it would be possible to lock the form from having any changes made to it once a signature has been added to it by a Manager?

 

Scenario:

We have a form we use that contains information that is populated by a user, once that user has completed their data entry (a long form), a signature is required before it is submitted by a manager. We do not want to send it through the Workflow as it is based on being on a site visit (1 Form).

 

We would like to know if it would be possible to change the form at that time as soon as the signature has been added to be un-editable?

 

With thanks

Ziad Khamo

1 0

Answer

SELECTED ANSWER
replied on October 8, 2018 Show version history

Hi Ziad,

 

You could try something like the below. You will probably want to play around with it to suit your requirements. But this will disable all input elements on the form and only allow the submit / approve / reject buttons.

 

$(document).ready(function(){
    
  $('.signSignatureBtn').click(function(){
    var selection = 1;
    setInterval(function() {
      if (selection == 1){
        var sigLength = $('.ManagerSignature img').length;
       //console.log(sigLength);
       // console.log('changed sig field');
        if (sigLength == 1){
            $('Body input').attr('disabled',true);
            $('.action-btn').attr('disabled', false);
          }
      }
  selection = 0;
    },500);
    
  });
  
});

Edit: The part you will need is only really the signSignatureBtn click part and setting / disabling the disabled attribute on required elements. I had the setInterval in there as I was playing around with getting the signature length.

Edit2: Added check to signature field so that change only happens on specific signature field. Set css of desired signature field to "ManagerSignature:

4 0

Replies

replied on October 8, 2018

Wow This working perfect!!!

Thank you Aaron very much!!

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.