You can use data entered by a user on a form to personalize their experience within the interface. For example, you can greet users by their name on the following page after they've submitted a form.
To use form details on a component, you need:
- a field reference ID: a unique ID for a specific field in a form.
- a Navigate to page action: this allows the form to send a visitor to a different page and make the form submission available on that page.
Set up the form and find the field reference ID
1. Find the reference ID
The field reference ID is a unique identifier for each field in your form.
- On a form component, click the field you want to use. A sidebar will open.
- Scroll down to the bottom of the field options, and click REFERENCE.
- You can use the existing reference ID for the field or type a unique reference ID for each field.
- Keep the reference to use later. Repeat these steps for each field you want to use.
- Click the Back arrow on the sidebar to return to the form setup.
2. Add a Navigate to page action
- In the Actions tab, click + Add action.
- In the new window, click the Action dropdown menu.
- Select Navigate to page.
- Click the Page dropdown menu and select a page.
- Select the Send data to this page checkbox.
- Click Create action.
Once you have completed these steps, you can personalize either a text component or a form component.
Use a text component
To customize your text component, you must use a code snippet. This will allow data from the form to be used in the component.
- Click your text component. A sidebar will open.
- Copy the code snippet that appears below into any text editor on your computer:
{{params.fieldreference|default:"default wording"}}
- Replace
fieldreference
with the field reference ID you want to use. - Replace
default wording
(keep the double quotes) with a default text. This will be used if the form field is blank. - Paste the completed code snippet into the text component Content field.
You can show a user's name on the page after they filled out a form. In this example, the field reference ID is "name", and the default wording (what will be used if the form field is blank) is "visitor". So, the code snippet would look like this:
{{params.name|default:"visitor"}}
Use a form component
To fill fields from one form into a different one, you need to ensure the reference ID of both fields is the same. You can paste the original form's reference ID into the second one.
- Go to the page you selected in the Navigate to page action.
- Find and click the form component you want to use to display information from the original form. A sidebar will open.
- Scroll down and click REFERENCE. The section will open.
- Paste the reference ID you obtained from the first form into the Reference ID field. You can repeat these steps for each field you want to use.
If your interface has managed users, learn how you can personalize components with managed user information.