Customizing a Distance element
The Distance element lets you enter two addresses and calculate the distance between them. It is especially useful for calculating shipping or travel costs.
- The Element Label input field lets you name your element. The toggle controls whether the label is visible or hidden.
- The Element Tooltip is a text field that lets you give more context to each element or explain what information you require to input. Once enabled, it will appear as a small info icon next to the element title.
- The Location inputs option lets you choose between two ways for users to provide information: two locations (from and to) or just one location.
- The Value metric lets you select the unit of measurement for calculations, such as kilometers or miles, to use in formulas.
- The Country restrictions option allows you to specify which countries the addresses should be searched from.
- The Show inputs horizontally option lets you choose how to display the input fields when there are two location inputs.
- The first and second location inputs let you customize the input details, hide or disable the input, or specify allowed addresses in a dropdown list.
- The Label input field lets you name the specific input field (e.g., From).
- The Input display option allows you to choose how the input should appear. Read more on that below.
- The Default location sets the initial address for that input field.
- The Prefix input field lets you add text before the input.
- The Postfix input field lets you add text after the input
Understanding Input Display Options
-
None
This option shows a regular input field where users can enter an address. -
Hidden
This option hides the input field from the user, but you still need to set a default address. The address remains in the system but is not visible to the user. It's useful, for example, when you have a warehouse address for deliveries, but only want users to input the destination address to calculate shipping costs. -
Disabled
This option shows the input field with a default address that users cannot change. The address is displayed but not editable by the user. -
Dropdown
This option lets you offer multiple addresses for users to select from. You can assign a label to each address and choose a default address to appear in the dropdown.
Notes
- The Distance element calculates the straight-line distance from point A to point B.