Web forms provide Lookup element that enables selection of a lookup record. Below are the settings you see after adding Lookup element to the web form.
In the below screenshot , the form displays Contact information. The Lookup element is the account field of the contact.
General
- Field label : Label of the lookup form element you wish to capture through web form.
- Field Description : A description of the lookup form element, typically providing details on the kind of data it captures.
- Data Sources : Create Data Sources to extract data from Salesforce. These Data Source will appear here. Let’s say if you want to display Contact(with all the information like First Name, Last Name, Account and so on). You need to fetch that data by creating SOQL Data Source on Contact object and supply the data to the form using this Data Source.
- Field API Name : Choose the Data Source field(Account in the above example) to map your lookup form element here.
- Key : Each form element you add to your web form has a unique, automatically generated value. That is visible here.
- Transient : If enabled, the field will not be saved in Salesforce after the Web Form is submitted.
- Disabled : If enabled, then you cannot edit the field, and data will not be submitted. Takes precedence over read only.
- Read Only : If enabled, then you cannot be edit the field, and data will still be submitted.
Condition
- Hide if : If you need to hide your lookup field under certain conditions, then you can mention such conditions in Hide if editor of lookup form element.
Layout
-
- Columns : By default, this is Auto, meaning that you divide the form based on the number of form elements you add in a single row. You can change it according to your business needs, so that you divide the form into the number of columns mentioned here.
Validation
- Required : If your Lookup input is mandatory for your form to save, then enable this.