There is often a need to be able to personalize the content of the form based on the logged-in user. This feature allows developers to add data to the form to account for that. For example, this can be used to add content to the form based on who the logged-in user is.
This feature has been used to prepopulate specific elements on a form with the content that was entered by that user on their most recent submission. This removed the need for the users to enter that information every time they completed the form, saving them a significant amount of time.
Custom URL and Hosted API
At the moment Personalization is only available via API. You can configure your Personalisation endpoint using Custom URL or CivicOptimize API Hosting.
Below is a type definition of the request payload:
{
formsAppId: number
formId: number
externalIdUrlSearchParam: string | null
draftId: string | null
preFillFormDataId: string | null
jobId: string | null
previousFormSubmissionApprovalId: string | null
}
Below is a type definition of the response payload:
{
submission?: {
[formElementName]: any
}
elements: FormElement[]
}
Instructions
-
Navigate to the Forms tab and select the applicable form or create a new form
-
On the Summary tab, scroll down to the Personalization section and choose Custom URL or Hosted API
-
Custom URL: Enter the URL address for an API endpoint
-
Hosted API: Select a Hosted API you have created in CivicOptimize and a Route from the drop-downs
-
Custom URL: Enter the URL address for an API endpoint
- Scroll up and click Save
Comments
Let us know what was helpful or not helpful about the article.0 comments
Please sign in to leave a comment.