Introduction
Conditional fields allow certain custom fields to be displayed only when specific conditions are met.
⚠️ In AntsRoute, this feature is available only for custom fields used when a driver validates a delivery in the mobile application.
When creating a custom field, you can define a trigger that will display this field only in certain situations.
The trigger can be:
- another custom field
- an AntsRoute element, such as a service type, duration, etc.
This allows you to adapt the information requested from the driver depending on the delivery context.
☝️ To learn more about custom fields, please refer to the related article.
Example of use
You may want to request additional information only for certain deliveries. For example, you can create a first field Delivery status with several options:
- Delivery completed
- Partial delivery
- Delivery refused
Then you add another custom field Reason for partial delivery with the following condition:
If Delivery status = Partial delivery (trigger), display this other field.
This way, the driver only sees the fields that are necessary when validating the delivery.
Step 1: Create a category
Before creating a custom field, you must first create a category in the Validation of a delivery tab.
To do this:
- Log in to your AntsRoute account.
- Open the Settings menu.
- Click Custom fields.
- Select the Validation of a delivery tab.
- Click Create a category.
- Enter the category name.
- Save.
Categories allow you to organise custom fields.
☝️ To learn more about categories, please refer to the related article.
Step 2: Create the validation custom fields
- Click Create a field.
- Enter the field name.
- Select the category.
- Choose the field type.
- Indicate whether this field must be completed by the driver.
When creating the field, you can define a trigger.
This trigger determines under which conditions the field will be displayed.
Configure the Trigger
When creating the field, you can define a display condition:
- Enable the Trigger option by clicking on Filter.
- Select the trigger field.
- Define the value that will trigger the field display.
- Click Apply.
- Save the changes.
The field will appear only when the condition is met.
Practical Example
Field being created: Reason for partial delivery
Trigger:
Delivery status = Partial delivery
Result:
The field Reason for partial delivery will be displayed only when the selected Delivery status is Partial delivery.
☝️ Good to know
Conditional fields allow you to:
- avoid displaying unnecessary fields
- simplify the validation form for drivers
- collect information adapted to each type of service
Conclusion
Conditional fields allow you to adapt the information requested when validating a delivery.
By defining a trigger when creating the field, you can display this field only when certain conditions are met, for example when a specific service type is selected.
🙋♀️ Need help?
If you are having difficulty understanding how custom fields work, please feel free to contact AntsRoute support by email or via the chat available from the web interface.