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

Question

Question

Display SIgnature within Custom HTML

asked on August 24, 2017

We're developing a Form which will be used to generate a PDF of a letter that will be sent out based on the information requested within the form. As a part of this, we need the signature of the person who reviewed the letter to be embedded within the Custom HTML that generates the letter. The goal is to allow the user to enter data into textboxes and then preview the letter that will be sent out. At a later step a PDF of the letter will be stored within Laserfiche as a reference and for printing purposes.

Are there any examples of how to do this within Forms 10.2? The signature field didn't appear as a field that could be placed into the custom HTML directly like other fields can be.

Thanks! 

0 0

Replies

replied on August 24, 2017

Without seeing your custom html script i can only give you a generic example so i hope this helps.

Inside your Custom HTML container create an empty image element:

<img id="sigPreview" class="hidden" src="">

After you have done that you can create a JavaScript event to fire when a signature is made like so.

function sigPreview() {
 var src = $('img.form-sig-img').attr('src');
 $('#sig').attr('src',src).removeClass('hidden'); 
}

$(document).ready(function () {
    $(document).on('click','button.signSignatureBtn',function() {
      setTimeout(sigPreview,0);
    });
  
    $(document).on('click','a.form-sig-remove',function() {
      $('#sigPreview').attr('src','').addClass('hidden');
    });
});

Hopefully this will work for you :)

0 0
replied on August 25, 2017

Thanks! I'll give this a try. Is there a way to access the signature from a previous form if I need to get one from a different step in the process? Do you know if it would work with multiple signatures if I referred to the individually?

0 0
replied on August 25, 2017

To access one from a previous step just include it in the current form. It can be hidden if need be.

With multiple just do it the same way as above just have to uniquely identify the signature element.

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

Sign in to reply to this post.