This guide will explain how to use CSS to hide specific additional Salesforce Lookup fields from the search UI without affecting other functionality.
- Initial Setup:
- Drag and drop a “Salesforce Lookup” and an “HTML” field.
- Rename the fields as needed.
- Configuring The “Salesforce Lookup” Field:
- Click the pencil icon of the “Salesforce Lookup” field.
- Set “Object” and “Display Additional Fields”.
- Here, we are setting “Contact” as “Object”, and “Email”, “First Name”, and “Last Name” as “Display Additional Fields”.
- Configuring The “HTML” Field:
- Click the pencil icon of the “HTML” field.
- Paste the CSS to hide the “LastName” salesforce field from the Lookup search result.
- Please use this CSS.
- Here,
80bc-8f3e-1b5c
is the field ID of the “Salesforce Lookup” field. - And
LastName
is the Salesforce field API name.
<style>
#component-80bc-8f3e-1b5c .sfdc_field_LastName {
display: none;
}
</style>
Note: Please make sure to update the “Salesforce Lookup” field ID and the Salesforce field API name.
- Test The Form:
- Now, a user can search using the Last Name without displaying it on the Lookup search result.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂