The Lookup field enables you to “look up” data from another form’s entries. Learn more about creating data lookups.
The label will display as the title of the field or the question that is being asked on the form. You can select the icon on the right to hide the label on the form.
The Type option determines how the choices will appear on your form.
Drop Downs allow users to select one of the choices from a menu. The user must click into the menu in order to see the choices that are available.
Radio Buttons allow users to see all of the options, but only choose one of the choices.
Checkboxes allow users to see all of the choices and check all that apply.
Placeholder Text is a short prompt that describes the expected value of an input field. The prompt is displayed in the field before you enter a value, and disappears when you begin typing.
Look Up Choices From
Select the source form from the list of available forms in your organization. Please note that:
- Once you save your form, the lookup source cannot be changed.
- By default, you cannot look up data from encrypted forms – you must specifically allow the entry data to be available under the form settings. However, if you set up a Lookup field prior to enabling encryption, the Lookup field will continue to work.
- The Lookup field will still look up data from forms that have been archived (but not deleted).
- If you delete an entry from the source form, that lookup choice value will disappear. Likewise, if you delete a field from the source form that’s referenced by the Lookup field, that data will also be gone, and an error message will appear in the Lookup field settings until you update the form.
- Once you save your form, an icon will display next to the source form on the forms homepage. If you hover over the icon, you can see exactly which form is referencing the source form:
Choose the field from the source form that will populate the Lookup field. The label is the data associated with the field, and will be exported with the form. When you create a Lookup field, all of the field data from the source form is available to you.
By default, the choice label automatically populates the first text field on the source form. Typically, you will choose just one field – but you can add multiple fields as needed. If you need to add extra information to your choice options that you do not want to be part of the data, you can include that information in the choice description.
The choice description provides extra information about each choice value. It does not display as part of the value, and will not be exported with the form. The description can include text as well as any data from any field on the source form.
By default, all entries from the source form will be included as choice values in the Lookup field. However, you can use the Include option to filter choice values based on your own criteria. You can update the filter at anytime, and when you change the filtered values, the previously selected choice value will still be there when you update the entry.
You can select Add Cascade Filter to filter a subset of choices from the Lookup field:
Once added, the filtered choices will appear as a separate filter field. You can set the filter field type (Drop Down, Radio Buttons, Checkboxes) and even add multiple cascade filters (up to three) to create a series of cascading lookups.
Automatically populate the choice value for the user. The user can then choose to change the default value before submitting the form. Similar to the Include option, you can set a default choice that changes depending on what users select on the form.
Use the sort function to determine how to sort choice options (ex: sort a list of products by price from low-high). By default, choice options are displayed alphabetically.
Assign prices to each choice option. Using the Price dropdown, select a field on the source form to look up the price value and collect payment.
Set quantity limits and track quantities for the Lookup field. Quantity limits are updated and enforced when selections are made, and then again before forms are submitted. If the limit is exceeded, an error message is displayed. Quantities are only counted for submitted entries, not incomplete or deleted entries. To set quantities for the Lookup field:
- Open the source form.
- Add a Number field to track the quantity limit (ex: ‘Inventory Available’).
- In the source form entries, specify the available quantity for each item in the corresponding Number field.
Open the form containing the Lookup field and find the Limit Quantity option in the Lookup field settings:
- Quantity Available – Select the Number field on the source form containing the available quantity for the current choice option.
- Quantity Exceeded – Write a custom error message (‘Out of stock!’) to display when the limit is exceeded. This message can include static text, or you can use the Calculation Editor to create a dynamic message that changes depending on the quantity remaining.
Help text can be used to assist the user by providing additional instructions. Help text will display directly under the field.
Show This Field
By default, fields will always display on the form. However, you may want to hide specific fields or sections based on certain conditions such as a selected value of another field on the form.
- Always – Field is always shown.
- When – Field will only display when specific conditions are met. After selecting this option, the Conditional Logic Builder dialog will display allowing you to select when the field or section should be displayed.
- Internally – Field will not display on the public form and will only display when a Cognito Forms user is editing the form from the Entries page.
- Never – Field will never display.
Require This Field
Requiring a field will make sure the user provides a response. When a field is required, an error message will display, and the form cannot be submitted until a value has been added to the field. Required fields are indicated by a red asterisk next to the label. By default, fields are never required.
- Always – Field is always required. User must provide a response in order to submit the form.
- When – Field is required only when specific conditions are met. After selecting this option, the Conditional Logic Builder dialog will display allowing you to select when the field is required.
- Never – Field is not required. This is the default behavior.
You can set a custom error message that will display under your field when specified conditions become true. The conditional logic builder will allow you to add any number of rules for validating your field. Learn more about the custom error option.