Form Structure
Custom Forms require two sets of definitions in order to function:
- The Form Data Definition declares the data objects that will be submitted at the end of the form. Every input you need from a user requires an associated object in the data definition.
- The Form Display Definition declares how those data objects are displayed to the end-user. In general, an object referred to in the Form Display Definition must exist with the exact same name within the Form Data Definition.
Form snippets
You can use prebuilt form snippets to easily add commonly used form objects.
- Log into your Spoke Phone account portal online
- Go to Other > Developers > Form Definitions
- Click +Add custom form
- Add a form name, description and form reference.
- Scroll down the page and Select Insert form template or snippet
- Find a snippet you'd like to use and select the icon
- The snippet is added into your form
- Click save
Form Testing
By default, a form is set to not show within the Spoke Phone App. You can use this feature to build draft forms, and as an administrator, you can see those draft forms within the Spoke Phone App.
Using this test feature gives you a chance to fill out the form to test how it displays and operates. You can also test any required fields and error messages.
Test your form design
- As an administrator, log in to the Spoke Phone App.
- Tap on the profile menu icon at the bottom.
- Tap settings.
- Tap on Test draft forms.
- Tap Select a draft form.
- Choose a form you wish to test.
- Scroll to the top and tap Submit.
In 'Test' mode no form data is actually saved or submitted. - Scroll through the form and check any error messages you see.
- Scroll to the bottom to the section marked Submitted Data.
Here you can preview the data that will be sent when this form is live.
Test your form behavior on a real call
- As an administrator, log in to the Spoke Phone App.
- Tap the Call History menu icon at the bottom.
- Select a call to submit a form against.
Note: You will only be able to submit one form per call and you cannot remove a form submission. - Underneath the action buttons, tap Select conversation form.
Note: You can also select a form during an active call, the submit button becomes available when the call ends. - Tap a form name you wish to test.
- Complete the form and select submit at the top right of the call history screen.
- The form is submitted in the live environment, webhooks are triggered and email is sent to the recipients of the form.