Clearing the Contents of the Signature Control

Add JavaScript to clear the contents of a signature control.

  1. Use the Mobile Workflow Package Generation wizard to generate the Mobile Workflow package and its files.
    When the Mobile Workflow package is generated, the Custom.js file is generated if not already present in the project. The Custom.js file is located in Generated Workflows\<workflow_project_name>\html\js.
  2. Open the Custom.js file and add your JavaScript code to the click event of a menu or button.
    For example:
    function customAfterMenuItemClick(screen, menuItem) {
        if (menuItem === "Clear_Signature") {
            $.data(document.getElementById('sigKey'), 'signature').clearSignature();
        }
    }
  3. Save and close the Custom.js file.
  4. Re-generate the Mobile Workflow package and deploy it to Unwired Server.