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

Question

Question

Forms 10.4 and Topaz Signature Pad

asked on June 27, 2019

Has anyone gotten the topaz signature pad to work with Form 10.4.1.164?

 

We are in the middle of an upgrade and our production environment which is still 10.2 recognizes the topaz just fine.  Our dev and test environments have been upgraded and the topaz is no longer recognized.

 

I appreciate any help we can get.

 

This is the JavaScript we are using.  I have gone over all three environments and the script matches on all three.

 

var baseUri = "http://localhost:47289/SigWeb/";

function initSigWeb() {
    var ctx = $("#sigTabContent .signatureSettings").get(0).getContext('2d');
    ResetParameters();
    SigWebSetDisplayTarget(ctx);
    tmr = setInterval(SigWebRefresh, 50);
    SetDisplayXSize(438);
    SetDisplayYSize(150);
    SetJustifyMode(0);
    SetTabletState(1);
  

    $("#sigNav a:eq(0)").hide();
    $("#form-signature-dlg").on("shown.bs.modal", function () {
      $("#sigNav a:eq(1)").click();
      //$("span.clearSearch").click();
      KeyPadClearHotSpotList(); 
      ClearSigWindow(1); 
      ClearTablet(); 
      SetLCDCaptureMode(2);     
      $("button.signSignatureBtn").removeAttr("disabled");
      gSignature.sigPad._isEmpty=false;
    });
    $("span.clearSignature").on("click", function () {
        SetLCDCaptureMode(1);
        KeyPadClearHotSpotList();
        ClearSigWindow(1);
        ClearTablet();
        $("button.signSignatureBtn").removeAttr("disabled");
        setTimeout(function () { SetLCDCaptureMode(2); }, 2000);
    });
    $("#form-signature-dlg").on("hidden.bs.modal", function () {
        SetLCDCaptureMode(1);
        KeyPadClearHotSpotList();
        ClearSigWindow(1);
        ClearTablet();
    });
}

$(document).ready(function () {
    if (!window.isPrintMode) {
        $.getScript("http://localhost:47289/SigWeb/SigGetScript/SigWeb.js", function () {
            initSigWeb();
        });
    }
});

 

1 0

Answers

APPROVED ANSWER
replied on July 15, 2019

Just in case anyone who still runs into the issue of using Topaz signature pad with Forms, the following are the steps to set up Topaz signature pad with Forms:

 

1. Make sure you have installed SigWeb(version 1.5) from here:
    https://www.topazsystems.com/software/sigweb_install.pdf
    and after installation, you can test whether the installation is successful by testing it at:
    www.sigplusweb.com/sigwebtablet_demo.htm

 

2. Add custom html field to the form

    a. Get SigWebTablet.js from http://www.sigplusweb.com/SigWebTablet.js, you can just copy and paste from the page and save it into a file named as "SigWebTablet.js"
    b. Put SigWebTablet.js file into Forms/lib/
    (You can put the file anywhere in the project as long as it is the same as the src path in the script tag so that the file can be referred) 
    c. In form designer, under Layout tab, drag a Custom Html field to the canvas, and inside Custom Html field, under Basic tab,  click on Html tab,  and paste in the following line:
 

        <script src="/Forms/lib/SigWebTablet.js"></script>

 

3. Change forms.js
    a.    Locate the file, “forms.js”, which should be at “C:\Program Files\Laserfiche\Laserfiche Forms\Forms\js\form”
    b.    Create a backup copy of forms.js and name it as formsBackup.js just in case you break anything and want to revert back to the original version
    c.    Open forms.js and find the following line:

    if ((isMobileBrowser || $('#sigNav li.active').index() == 1) && Signature.sigPad.isEmpty())


    d.    Change the line to:

    if ((isMobileBrowser || $('#sigNav li.active').index() == 1) && Signature.sigPad.isEmpty() && $.initSigWeb == undefined)

 

4. Copy and paste the following js code into Form's CSS and Javascript editor in Form's layout designer

$.initSigWeb = function(){
  var ctx = $("#sigTabContent .signatureSettings").get(0).getContext('2d');
  
  $("#sigNav a:eq(0)").hide();
  $("#form-signature-dlg").on("shown.bs.modal", function(){
    $("#sigNav a:eq(1)").click();
    tmr = setInterval(SigWebRefresh, 50);
  	SetDisplayXSize(438);
  	SetDisplayYSize(150);
  	SetJustifyMode(0);
    SetTabletState(1, ctx, 100); 
    $("button.signSignatureBtn").removeAttr("disabled");
  });
  $("span.clearSignature").on("click", function(){
    SetLCDCaptureMode(1);
    KeyPadClearHotSpotList();
    ClearSigWindow(1);
    ClearTablet();
    $("button.signSignatureBtn").removeAttr("disabled");
    setTimeout(function(){SetLCDCaptureMode(2);}, 2000);
  });
  $("#form-signature-dlg").on("hidden.bs.modal", function(){
    SetLCDCaptureMode(1);
    KeyPadClearHotSpotList();
    ClearSigWindow(1);
    ClearTablet();
    SetTabletState(0, ctx, 100);
  });
}
     
$(document).ready(function(){
  if (!window.isPrintMode){
    $.initSigWeb();
  }
});

After you are done with all of the above 4 steps, you can try to restart IIS, and also do a hard refresh on the browser to make sure every change you made will be successfully loaded. 

3 0
replied on February 4, 2020

Since Forms 10.4.2, you don't need step 3 "Change forms.js" any more, Forms already added such code out of box.

2 0
replied on January 25 Show version history

For Step #3. How would we accomplish this in Cloud where we do not have access to the local JS files?

0 0
replied on January 25

Please see Xiuhong's comment immediately above. Since Forms 10.4.2, Step 3 is no longer needed. I'm 95%+ sure that code is in Laserfiche Cloud Forms as well.

1 0
replied on January 25

Ok great so we can skip editing any local files. I put together a Cloud script that references the SigWebTablet.js file directly instead of downloading it. Will try it out.

1 0
SELECTED ANSWER
replied on July 5, 2019

UPDATE:  This upgrade we also changed all our web servers from http: to https:.  Turns out the Security certificate from Topaz on each local machine had expired.  After updating the security certificate on each machine, every thing is running fine again.

1 0

Replies

replied on April 23, 2020

I have just integrated a Topaz signature pad and the code above works great. It led me to another issue that I'm hoping someone has an answer for. I have a process that I need to embed a photo into. In order to do that on the fly I have to use the App. When I do, the Topaz no longer works. Will it be possible to get the best of both worlds? Having someone signing with a pad is much better than handing them a device with a touchscreen. I was hoping to be able to take the image and continue through the form. The alternative would be to have the desktop Forms have the capability to recognize a USB camera like the App does. Thoughts?

0 0
replied on April 26, 2022

Has anyone had success with this process using the sigweb version 1.7?

replied on March 6

Do we need to install Sigweb on the forms server? Also, for the step 2b where is "Forms/lib/"? Does this need to a folder path on the drive that forms is installed on? Im using form Ver11

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

Sign in to reply to this post.