Skip to main content
Create a Dynamic Dropdown Selection

Display client names instead of default Applicant labels

Aldrin Cosino avatar
Written by Aldrin Cosino
Updated over a week ago

Learn how to create a polished template by enabling an auto-replace feature. In the example below, an Ownership drop-down menu (Select component) automatically replaces the default Applicant 1 and Applicant 2 labels with the clients' first and last names.

Contents


Prerequisites

Know how to create a fact find template.

Know how to use components.


Creating template fields

The first step is to locate (or create) the first and last name fields that will feed into the dynamic drop-down menu. In the screenshot below, the template has two name fields (first and last) for two applicants. We created the name fields with four Text Field components. We created a bank account Ownership drop-down menu using a Select component.

The Ownership drop-down has three data source values: Joint, Applicant 1, and Applicant 2.


Copying property names

Next, find and copy the API Property Name for each first and last name field.

To complete this task, it's a good idea to open Notepad (or a similar app). You'll need to copy and paste several names.

  1. Select one Text Field component (e.g. Applicant 1's first name).

  2. Click the Edit icon.

  3. Select the API tab.

  4. Copy the value in the Property Name field.

  5. Paste that value into a Notepad file.

  6. Repeat the steps for the other name fields.


Creating a dynamic menu

Insert a bit of code to enable a dynamic drop-down menu.

  1. Go to the Select component with the drop-down menu (e.g. Ownership field).

  2. Click the Edit icon.

  3. Select the Data tab.

  4. Scroll down to the Item Template field.

Copy the below code and paste it between the span tags.

  1. Replace placeholder values in the default code with your values. (see below)

  2. Click Save and then Save again on the template page.

{{
(
item.value === 'applicant1'
? `${data.firstName} ${data.lastName}`
: item.value === 'applicant2'
? `${data.firstName1} ${data.lastName1}`
:''
).trim()||item.label
}}


Previewing the results

Go to the template page and click the Preview button.

  1. Go to the page with first and last names.

  2. Enter the name of each applicant.

  3. Click the Ownership field.

  4. Select a name or Joint.

The template displays the names instead of the generic Applicant 1 and Applicant 2 text.

If your template has multiple ownership fields (e.g. for Bank 2, Bank 3, etc.), copy the code and paste it into each Select component.


Related articles

Did this answer your question?