This article will walk you through creating a form element that uses the react-signature-pad-wrapper component to capture a user's signature.
Follow the instructions in the Web Applications SDK page to set up your development environment.
A working knowledge of TypeScript is recommended before extending Workflow for web-based hosts.
Implementing a signature block custom form element for web applications using a third party library consists of the following steps:
- Adding third party library dependencies to your project.
- Creating the custom form element.
- Implementing the custom form element using the third party library.
npm install react-signature-pad-wrapperin the terminal to install the third party react-signature-pad-wrapper component.
npm install @types/signature_padin the terminal to install type information for the third party component. This is optional, but it provides an improved developer experience.
To create a new form element:
- Open the Workflow activity SDK in Visual Studio Code.
npm run generatein the terminal.
- When prompted, select
- Enter the name of the form element you would like to create and press
Enter. For example,
- Open the newly created
Modify the skeleton form element implementation in
src/activities/SignatureBlock.tsx to match the following example.
Follow the instructions to build and deploy the activity pack.
Once your activity pack is hosted and registered, your
Register SignatureBlock Form Element custom activity should appear in the activity toolbox in Geocortex Workflow Designer alongside the built-in activities.
To use your custom form element in a workflow:
- Add your
Register SignatureBlock Form Elementcustom activity to your workflow so that it runs before any
Display Formactivities that will use the custom form element.
- Select the
Display Formactivity that you want to include your form element in.
- Add a
Customform element to the form.
- Set the
Custom Typeproperty of the
Customform element to
- Test your workflow.