- Use Case
- How to Build Cascading Filters in the Form Builder
- Using Filtered Questions in the Mobile App
You can use data source filters in tandem with ProntoForms' ability to auto-populate answers from a data source to narrow down the number of available answers in a dropdown question displayed to your mobile users.
These can also be stacked to create a cascade effect: the answer to Question 1 limits the available answers in Question 2, which in turn limits Question 3.
We have a basic customer list data source with a number of header fields:
We want to create a form where our mobile users can search and filter first by province, select a city in that province, then a select a customer. When they select a customer after these filters, the form will auto-fill the Customer Address, Phone Number, and Email Address.
- In the Form Builder, mouse over the desired Dropdown question.
- Select Edit Properties, then navigate to the Dropdown Properties tab.
- Select Data Source as the source data.
- Choose the data source from the list of available sources.
- Set the Display Column to what you want to have displayed to your mobile users.
- Select the Apply Filtering box.
- Select the column that the filter should be based off of.
- Choose the filter source: Text-based means that it has to match the text within the Filter String form; Question-based means that it has to match the selected question's answer. Most of the time in this example, we will use Question-Based filtering, but for this first one, we want to create a limited list for our users: all customers in Alberta.
- Repeat Steps 1-6 for a second question. On Step 8, however, select Question-Based Filtering, and select Question 1:
- Repeat Step 9 until you reach the desired filter level. In our example, we have one more dropdown question (Customer Name) that will be filtered by the answer to the City question. On the final question, select Collect Additional Answers:
Add as many additional answers as you wish to have auto-populate, and associate the desired Source Columns with the Target Questions to be populated. By default, the Generate button will be checked. This will generate a new question to be populated by the source column -- ie, if an existing question in the form is not selected for the Target Question, it will automatically create one.
This uses our example above to demonstrate the workflow for the filtered questions.
- Select a Province (as we filtered by AB, only AB is shown) - this can also be done by the default Dropdown Search Box.
- Tap on City (Click to Select). All cities displayed are located in Alberta:
- Tap on Customer Name (Click to Select). All customers listed are located in Calgary. When you select one of the customers listed, their information will auto-populate the final three questions.