MaestroThe UI design product. | Form Builder Platform Developer | 19.05 This feature was introduced in 19.05.
While building onboarding application forms, you can use various reference data to pre-fill and autocomplete form's fields, as well as validate user input against this data. Reference data is static data that is created and stored in Manager and it is pertinent to an organization, which Maestro forms, belonging to that organization, can access.
Journey Maestro allows Form Builders to access reference data using Cascading Dropdowns. For more information, see Prefill a Cascading Dropdown in Composer
To complete your reference data implementation, you need to add cascading dropdowns. Here we will add additional dropdowns for Model and Year to the form. When the value selected in the manufacturer dropdown changes, the model will be re-populated with the models available from the chosen manufacturer. Similarly, when the model dropdown selection changes, the years dropdown will be re-populated.
Because we have continued to use the 'label' and 'value' properties throughout all levels of our JSON data, we don't need to change the 'Label Field' and 'Value Field' properties on any of the dropdowns.
The instructions here relate to the initial Data Field named 'manufacturers' and Dynamic Data Dropdown called 'manufacturer'. We created these components in the JavaScript library method. If you followed the JavaScript Library instructions and saved your form, re-use that form here so that your data fields and dropdown names match these instructions.
motorCyclesReferenceData
from the JavaScript Library method instructionsvar selected = data.manufacturer;
data.manufacturers.some(function(element) {
if (element.value === selected) {
data.models = element.models;
data.years = undefined;
return true;
}
});
return undefined;
data.years = data.models.filter(function(element) {
return element.value === data.model
})[0].years;
Next, learn about pre-submit validation.