Pathfora now allows for fully customized form fields for modules of type form and gate. These input fields include text, texarea, select, checkbox, and radio button.

Try out our form schema builder to easily build forms with a drag and drop interface and output a formElements object for your module config.

Legacy form documentation is also available here

formElements

This is a list of form element objects to include in the module's form. The order of these elements determines the order in which they render in the module.

object in formElements array
Key Type Behavior
type string type of form element: checkbox-group, radio-group, select, text, email, date, or textarea
name string name attribute of the field, this is the primary identifier used in tracking
label string optional label to give the field context to the user
placeholder string optional placeholder text for text input, textarea, and select fields
values array optional list of options for checkbox, radio, or select elements.
minDate string optional minimum allowed date the user can select. Can be today or a date formatted mm-dd-yyyy (only applicable when type = date)
maxDate string optional maximum allowed date the user can select. Can be today or a date formatted mm-dd-yyyy (only applicable when type = date)
object in values array
Key Type Behavior
label string the value of the option shown in the form to the user
value string the value attribute of the option or input element, used in tracking

Custom Forms - Live Preview

Form Fields



formStates

Set a custom success or error state message on confirmation to show after the user submits a form.

formStates object
Key Type Behavior
success object optional object containing the settings for the success state
error object optional object containing the settings for the error state (note that the error state is only used by modules with the waitForAsyncResponse field set to true
success or error object
Key Type Behavior
headline string header or title text for the success state
msg string text message content of the success state
delay int how long in seconds to show the success state before hiding the module. if 0, the module will not hide until the user closes it
okShow boolean if true, show a confirmation button as part of the success state
cancelShow boolean if true, show a cancel button as part of the success state
okMessage string text for the confirmation button on the sucess state
cancelMessage string text for the cancelation button on the success state
confirmAction object object containing the name and callback function for the confirmation button on the success state (see confirmAction note that only the name and callback fields are relevant in this nested version of confirmAction).
cancelAction object object containing the name and callback function for the cancelation button on the success state (see cancelAction)

Success & Error State - Live Preview

Form States