Skip to main content
All CollectionsCollect fact find and documentsFact finds
Enable the Fact Find "Same as" Feature
Enable the Fact Find "Same as" Feature

Clients save time by copying information with a checkbox

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

Learn how to enable an auto-copy feature on a fact find template. When the client checks a box, the template automatically copies the values from one set of fields to another. For example, a client can copy Applicant 1 address information to Applicant 2 fields.

Contents


Prerequisites

Know how to create a fact find template.

Know how to use components.


Copying component property names

In this example, we create a checkbox to automatically copy Applicant 1 address details (i.e. the copy source) to Applicant 2 address fields (i.e. the copy destination).

Open a fact find template page with fields that can benefit from the copy tool.

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 copy source component.

  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.


Adding a checkbox

Next, place a checkbox next to a copy destination component. In this example, we place the checkbox under the label Applicant 2.

  1. Go to the side menu and select Basic.

  2. Drag the Checkbox component to the template. A new window displays.

  3. Add a custom Label (e.g. Same as applicant 1).

  4. Select the API tab.

  5. Copy the value in the Property Name field.

  6. Paste that value into a Notepad file.

  7. Click Save.

BrokerEngine adds the checkbox to the template.


Creating a trigger

Insert a bit of code to convert the checkbox into a trigger.

  1. Go to a copy destination component.

  2. Click the Edit icon.

  3. Select the Data tab.

  4. Scroll down to the bottom of the page.

  5. Check the box next to Allow Manual Override of Calculated Value.

  6. Click the box next to Calculated Value. The folder expands.

When you check the Allow Manual Override of Calculated Value box, users can enter custom values in the destination components (e.g. the address of applicant 2 is different from applicant 1).

Expand the JavaScript field (if not already open).

  1. Copy the below code and paste it into the JavaScript field.

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

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

Placeholder values

From the Notepad file:

  • Insert your checkbox API property name (the placeholder value is sameAsApplicant1).

  • Insert your component API property name (the placeholder value is street).

 if (data.sameAsApplicant1) {
value = data.street
} else {
value = '';
}

Previewing the results

Go to the template page and click the Preview button.

  1. Go to the copy source component.

  2. Enter a value.

  3. Check the box.

If the code is correct, the template auto-copies the source value into the destination component. If you uncheck the box, the template clears the destination component field.


Repeating the steps

Now that the same as feature works for one component, repeat the steps for each remaining destination component.

  1. Select a destination component and click Edit.

  2. Select the Data tab.

  3. Check the box next to Allow Manual Override of Calculated Value.

  4. Go to the JavaScript field and paste in the code from the first destination component.

  5. Go to the value = data.street line and replace the old property name with the new one. Don't change the checkbox property name.

  6. Click Save and then preview the template.


Related articles

Did this answer your question?