Formcrafts - a form and survey platform for Salesforce, HubSpot, etc
  1. Templates
    1. All templates illustration
      All templates
    2. Application forms illustration
      Application forms
    3. Calculation forms illustration
      Calculation forms
    4. Lead generation forms illustration
      Lead generation forms
    5. Customer service illustration
      Customer service
    6. Evaluation forms illustration
      Evaluation forms
    7. Survey and feedback illustration
      Survey and feedback
    8. Operations forms illustration
      Operations forms
    9. Payment forms illustration
      Payment forms
    10. Booking and registration illustration
      Booking and registration
    11. Salesforce forms illustration
      Salesforce forms
    12. Other forms illustration
      Other forms
  2. Features
    1. 18 Form Fields illustration
      18 Form Fields
    2. 19 Integrations illustration
      19 Integrations
    3. Conditional Logic illustration
      Conditional Logic
    4. Multi-step Forms illustration
      Multi-step Forms
    5. Calculations illustration
      Calculations
    6. Partial Submissions illustration
      Partial Submissions
    7. Save & Resume illustration
      Save & Resume
    8. Payments illustration
      Payments
    9. Hidden Fields illustration
      Hidden Fields
    10. Dynamic Dropdowns illustration
      Dynamic Dropdowns
    11. Engagement analysis illustration
      Engagement analysis
    12. Multilingual forms illustration
      Multilingual forms
  3. Pricing
  4. Help
  5. Login
  6. Signup
    →
  • Help index
  • Features
    • Conditional logic
    • Prefill forms
    • Multi-step forms
    • Calculations
    • Partial submissions
    • Field references
    • Save and resume
    • Hidden fields
    • Dynamic lookup
    • Workflows
    • Dynamic dropdowns
    • Multilingual forms
    • Privacy mode
    • Success message
    • Form redirect
    • GA/GTM
    • Accept payments
    • Linked forms
    • Disable form
  • Styling
    • Custom CSS
    • Custom fonts
    • Color scheme
    • Form background
  • Analytics
    • Test mode
    • Overview
    • Field analytics
    • Form engagement
  • Workflows
    • Send emails
    • Form redirect
    • Success message
    • Webhooks
    • Create PDF
    • ActiveCampaign
    • Asana
    • Mailchimp
    • Front app
    • Freshdesk
    • Google Sheets
    • Pipedrive
    • Linear
    • Klaviyo
  • Sharing
    • Custom form link
    • Embed on a page (inline)
    • Embed on a page (popup)
    • Embed in emails
    • Embed on WordPress
    • Embed on Shopify
    • Embed on Squarespace
  • Salesforce
    • Overview
    • Create records
    • Update records
    • Related records
    • Dynamic picklists
    • Attach files
    • Create PDFs
    • Form prefill
  • HubSpot
    • Overview
    • Create contact form
    • Create lead capture form
    • Create customer survey
    • Prefill HubSpot form
    • Embed on HubSpot page
    • Uninstall
  • Zendesk
    • Create ticket form
    • Create CSAT survey
    • Embed on Help Center
    • Prefill ticket form
  • Admin
    • Users
    • Custom domain
    • Vanity subdomain
    • Subscription
  • Developers
    • Embed Library
    • API keys
    • API v1
    • API v2
  • Others
    • Partner program
    • GDPR compliance
    • Workflow logs
    • White labeling
    • Form speed
    • Zapier
    • Migration
  • Contact
  1. Help
  2. ›
    Salesforce
  3. ›
    Dynamic picklists

Create Dynamic Picklists

On this page
  1. Introduction
  2. Basic setup
  3. Picklist sources
  4. Source: Object
  5. Source: SOQL query
  6. Source: Picklist
  7. Notes
    1. SOQL format
    2. Dynamic picklist + form prefill

Introduction

Dynamic picklists are a type of form field that fetch options from Salesforce in real-time. The data source could be a Salesforce object, a custom SOQL query, or a picklist field. You can add dynamic picklists on any Salesforce form ↗ created in Formcrafts.

Dynamic picklists in Formcrafts have some additional features like:

  • Unlimited options: There source in Salesforce can have any number of options. Formcrafts uses smart logic to fetch options in chunks, so you can have thousands of options without any performance issues.
  • Searchable: Options can be searched by the user. Example, if the user types in "Max" in a picklist, the picklist will fetch and show all options that contain "Max".
  • Option description: In addition to a text label your options can have a description. This is useful when you have a large number of options and you want to provide more information about each option.
  • Option groups: Options can be grouped. Example, you can have a picklist of countries, and group them by continent.
  • Multi-select: You can enable multi-select on your picklist field, allowing users to select multiple options.
  • Dynamic query lookup: You can use a SOQL query to fetch options from Salesforce. However, this query itself can be dynamic, based on the user's input in other fields. Example, you have a field that allows user to select a department, and another field that allows user to select an employee. The employee field will fetch employees from the department selected in the first field.

Basic setup

On your Formcrafts dashboard ↗ click on Add Form → Start from scratch. Enter a Form name and hit enter. This will create a new form.

You can also create a new form by clicking on Add Form → Use a Template and selecting a template. This would allow you to skip this step.

Now add a dropdown fields to your form using the Add field button on the top-left corner of the form editor.

Next we need to enable Salesforce integration for the form. Click on Settings → Integrations → Enable integration, and find Salesforce. This will open a popup window where you can connect to your Salesforce organization.

Enable Salesforce integration
Enable Salesforce integration

Picklist sources

Click on the cog button next to the dropdown field. This will open the field settings. Go to Options → Source, and select Salesforce.

Dynamic picklist sources
Picklist sources

You can now select the source of the picklist.

Source: Object

The object source fetches options from a Salesforce object. Example, you select Contact as the object, and the picklist will fetch all contacts from Salesforce.

Apart from Select Object, you can also configure:

ID field: The field in the object that will be used as the value of the option. In most cases this should be the unique record ID. Example, the Contact ID.

Label: This would become the user-facing text of the option. Example, the Full Name.

Description: This is optional. It can be used to provide more information about the option. Example, the Street.

Image: This is optional. It can be used to show an image with the option. Example, the contact’s photo.

Group: This is optional. It can be used to group options. Example, you can group contacts by Country.

Dynamic picklist object source config
Source: Salesforce object

Here is a video showing how to create a dynamic picklist that fetches options from Salesforce, and uses labels, descriptions, and images.

Dynamic picklist with photos and description

Source: SOQL query

The SOQL source fetches options from Salesforce using a SOQL query.

Example, use this query to fetch a list of contacts, along with their id, country, and account name.

SELECT Id, Name, Account.Name FROM Contact

The fetched columns can be used as the option’s value, label, description, image, and group. You can refer to them directly, like Id or use references like: Works at {Account.Name}.

Dynamic picklist SOQL source config
Source: SOQL

You can reference other fields in the form to make the query dynamic. Example, you can fetch contacts based on the country selected in another field.

SELECT Id, Name FROM Contact WHERE MailingCountry = '@Country'

Formcrafts will track the country field and fetch options based on its value.

Dynamic picklist SOQL source with field reference config
Source: SOQL with field reference

Source: Picklist

The picklist source fetches options from a Salesforce picklist field. Example, you can fetch the values of the Industry field of the Account object.

Dynamic picklist picklist source with field reference config
Source: Picklist

Notes

SOQL format

The SOQL query is case-insensitive. Please make sure the column names are correct.

Dynamic picklist + form prefill

You can use the dynamic picklist with the prefill feature. For example you can create a picklist that allows selection of a contact, and then use the prefill feature to fill the form fields with the contact’s details. Learn more about using Salesforce form prefill.

Minimal, fast, and powerful. Try now.
Formcrafts - a form and survey platform for Salesforce, HubSpot, etc

Subtle Web Inc,
225 Railway St E,
T4C 2C3, Cochrane AB

Salesforce AppExchange partner logo HubSpot app partner logo
Templates
Application formsLead generation formsSurvey & feedback formsEvaluation formsSupport request formsBooking & registrationContact forms
Comparisons
vs AllFormAssemblyTypeformJotformWufooSurveyMonkey
Features
Conditional logicSalesforce formsHubSpot formsZendesk ticket formsEmail formsIntegrationsForm fields
Resources
Help centerBlogDeveloper APIGDPRStatusReport abuseContact us
Company
About usNonprofitCase studiesSecurityTerms and privacy