Personalizing the form experience

Last updated on November 22, 2024

You can combine data and text to create a more personal experience for citizens.

On this page:

What's meant by "personalization"

Whenever a form experience is made unique for the person completing the form, we can say it's a 'customized' or 'personalized' experience.

Customized experiences usually reflect individual needs based on things like progressive disclosure using visibility. This experience is shared across people with similar needs or situations.

Personalized experiences involve using form data to present content and information that is unique to the individual, such as their name to provide a more direct and conversational experience.

Template Parameters are the easiest way to accomplish this, but in certain cases, you will need to use the concat() function to combine text and data.

Using Template Parameters

Template Parameters are available for:

  • Labels
  • Help Messages
  • Repetition Labels
  • Add Repetition Labels
  • Explanatory Texts
  • Email templates

To use Template Parameters, first navigate to the appropriate tab in the control's settings. Then:

  • Write your consistent text
  • Insert variables to include in your text
  • Define your variables in the Template Parameters section

See the example below for more detail.

For additional information, see:

Example: Addressing someone by name

You have a wizard form and you want:

  • The first panel to request the individual's name
  • The second panel to address the individual by name

To do this you'll:

  1. Navigate to the second section's Label tab in the Section Settings
  2. Write your text setting off any variables you want to use with a dollar sign and curly brackets
    • Example: "Thanks, {$name}. How can we help you today?"
  3. In the Template Parameters section of the tab, click the plus icon to the right
    • This activates the line to assign the parameter or variable
    • For each variable you want to assign, click the plus icon again
  4. On this new line:
    • Write the variable name you chose
    • Use the pulldown option of "Control Value", and
    • Select the control from the pulldown list
  5. When done adding assignments, click the Apply button

To see this example in action, see the Personalizing forms demonstration.

Note that templates can also allow entry of a Formula or several Link types.

  • Link types require the use of data storage and processing ("workflow") which is not currently available.

Using a formula

For the demonstration form, we simply turned on the wizard option and left everything else with the default settings. As a result, you can navigate to the second panel without entering a name. This results in the phrase reading "Thanks, . How can we help you today?" Since the name isn't present to include in the phrase, there's a blank space between the comma and the period.

There are 2 options to address this:

  1. When setting up the View Options for the form, set the Wizard Navigation Validation Mode to Strict. This prevents a user from moving to another panel when the panel they're on has validation errors. They'll need to provide a first and second name to move to the next screen
  2. Use a formula to define what the first part of the phrase should be while the first name is still blank. This option can be useful if you want to include the value in the section's Short Label, or if you are not using a wizard. It will avoid those awkward spaces

In this particular example, we would replace the original "Thanks, {$name}." portion of the phrase with a single variable immediately before the remainder of the phrase, such as:

{$name}How can we help you today?

Then we could define the value of name using a formula such as:

If (is-blank($givenName)) then '' else concat('Thanks, ', $givenName, '. ')

With this particular formula:

  • If the first name has not been provided, the phrase would simply read "How can we help you today?" 
  • If the first name is provided, the phrase would read "Thanks, John. How can we help you today?"

There are other variations you could apply in your formula.

For additional information, see: