Start free trial

Dropdown List Lookup Example: Product Finder

In this Lookup field example, we wanted to create a simple product finder that staff could use to lookup product codes.

We were able to achieve this by using a series of dropdown list lookups that all linked to a separate source form containing the product information. By enabling the cascade feature, the selection made in the first lookup field determines the list of options in the next lookup field, and so on. 

Using conditional logic, the ‘Name’ field is hidden until the last lookup returns a matching field value from the source form.

 

The following provides an overview of the form fields and settings required to create this type of lookup.

The source form

Firstly, we created a data source that will provide the product information for the lookups in our Product Finder form.

We created a basic source form called ‘Product Database’ with the following fields:

  1. Category (Short Answer field)
  2. Subcategory (Short Answer field)
  3. Model (Short Answer field)
  4. Name (Short Answer field)

To prevent entry of duplicate model numbers when this information is collected, we enabled the ‘Do not allow previously entered value’ option in the Model field’s Advanced Options.

 

Collect data

We created a simple database of our products by submitting the required details for each item. 

Tip: For large volumes of data, please contact Snapforms Support and request bulk uploads to be enabled.

You can check or edit the submitted information via the Form Responses List.

 

The master form

After completing the source form, we created a separate form called ‘Product Finder’ that will be used to perform the lookups.

This form contains the following fields:

  1. Category (Lookup: Dropdown List field)
  2. Subcategory (Lookup: Dropdown List field)
  3. Model (Lookup: Dropdown List field)
  4. Name (Short Answer field)

Tip: We recommend that you use the same field names as your source form to ensure successful field matching when using lookups to auto-populate fields in your master form.

Lookup field – Category

Field/OptionSetting
Lookup TypeUser selects from a dropdown list of possible values.
Source FormProduct Database
Source FieldCategory
Automatically populate other fields after lookupDisabled
Cascade filter answers based on another lookup fieldDisabled
Hide lookup result messageDisabled

 

Lookup field – Subcategory

Field/OptionSetting
Lookup TypeUser selects from a dropdown list of possible values.
Source FormProduct Database
Source FieldSubcategory
Automatically populate other fields after lookupDisabled
Cascade filter answers based on another lookup fieldEnabled, depends on ‘Category’

This will filter the list of subcategories based on the category selected in the previous lookup field.

Hide lookup result messageDisabled

 

Lookup Field – Model

Field/OptionSetting
Lookup TypeUser selects from a dropdown list of possible values.
Source FormProduct Database
Source FieldModel
Automatically populate other fields after lookupEnabled

When form users select a model, the system will auto-populate the Name field with the corresponding product name for that model contained in the source form. 

Cascade filter answers based on another lookup fieldEnabled, depends on ‘Subcategory’

This will filter the list of models based on the subcategory selected in the previous lookup field.

Hide lookup result messageEnabled

We don’t want a result message to appear after the lookup is performed and auto-populates the Name field.

 

Short Answer field – Name

In our source form database, each product model correlates with a specific product name. For example, a 90-litre chest freezer model is assigned the name ‘FZCH90’.

Instead of performing an unnecessary lookup, we simply used a Short Answer field called ‘Name’, and let the Model lookup field’s response (selected value) automatically populate the Name field.

To hide this field until a model is selected, we set the following conditional logic rule:

Now when a form user selects a model, the Name field appears with the corresponding value pre-filled.

Get an online form trial or demo absolutely free.