In the Geocortex Workflow TypeScript SDK, form elements are represented by TypeScript React Components.
Registering Form Elements
Form elements must be registered with a custom activity that extends
RegisterCustomFormElementBase. This custom activity can call
this.register to register each form element.
Only one form element registration activity is needed per app, as it can register multiple custom form elements. Learn more about implementing custom activities.
Using Form Elements
Custom form elements can be used in a form through the special "custom" form element. This form element displays custom form elements by referencing them by the
id they were registered with.
Raising Form Events
Geocortex Workflow form elements can raise events. A custom form element can also raise events, including a
custom event type.
Events are raises through the
raiseEvent function on the element
props. The follow custom form element demonstrates how various form events can be raised.
Access Properties of Custom Form Elements
A custom form element may produce a value that a workflow needs to access at runtime. You can set a property on the
props.element object to expose that value to the form.
You can then use the Get Form Element Property activity to access the
value property, along with other properties supported by custom form elements.