Dynamic lookups

Using the Lookup field, you can create dynamic field relationships to take your forms to the next level!

Filter choices on your form using cascading lookups

Cascading (or dependent) dropdowns can help narrow choices on a form depending what users select. For example, if you take a look at the Cognito Coffee Customer Survey, you’ll notice that the list of store locations changes depending on the city you select. Here’s how it works:

  1. Create a form for your list of cities (ex: Cognito Coffee Cities).
  2. Populate the form entries with your cities: cities.png
  3. Create a form for your list of locations (ex: Cognito Coffee Locations).
  4. Populate the form entries with the location name and address: locations.png
  5. Create a customer survey form (ex: Cognito Coffee Customer Survey).
  6. In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.
  7. In the Lookup field settings, find the Lookup Choices From option and select the cities form. By default, the Choice Label option should populate with the first text field from the source form – in this case, the City field. Customers will use this field to select their city.
  8. Add another Lookup field to your form. Set the Lookup Choices From option to the locations form, and set the Choice Label to the location address. Then, find the Include option, and only include entries where the city in the address is the city that customers select from the first Lookup field: include.png
  9. Optionally, set the second Lookup field (‘Choose a store’) to only appear when the first Lookup field (‘Choose a city’) is filled out: filled-out.png
  10. Save and open your form. Now, the list of store locations will update automatically depending on the city selected.

Show quantity remaining when looking up choices with limited quantities

With the ability to set and track quantities on your forms, you can use the Lookup field to display the quantity remaining when looking up choices with limited quantities. For example, let’s say that the Cognito Coffee Store has a limited inventory of logo t-shirts. When a customer is placing an order, we want to show them the quantity remaining for each size. To do this:

  1. Create an inventory form (ex: Cognito Coffee Store Inventory)
  2. Populate the form entries with any necessary details about each item (product name, price, size, available quantity, etc.): inventory-2.png
  3. Create an order form (ex: Cognito Coffee Store).
  4. In the builder, click into an empty placeholder to add a new field. Select Lookup from the Add Field menu.
  5. In the Lookup field settings, find the Lookup Choices From option and select the Inventory form. By default, the Choice Label option should populate with the first text field from the source form – in this case, the Product Name field.
  6. Find the Limit Quantity option. Set the Quantity Available value to the Starting Quantity field from your inventory. Make sure to include a message to display when the quantity is exceeded (ex: “Out of stock!”): Limit Quantity option.
  7. Add a Calculation field to your form. Here, you can reference the quantity remaining value for the Coffee lookup field: =Merchandise_QuantityRemaining
  8. Save and open up your form. Now, customers can view the quantity remaining for each product. If the quantity for a product has been exceeded, an error message will display and the customer must update their order.