Dynamic Forms in Salesforce [with Winter ’25 Updates]

Introduction to dynamic forms in Salesforce

Dynamic Forms in Salesforce allow users to customize which fields and sections appear on a page layout, making it easier to manage layouts with many fields. By converting these fields into individual components in the Lightning App Builder, users can arrange them to suit their needs. This flexibility helps create more efficient, personalized forms and improves data entry by showing only the necessary fields based on user preferences.

Overall, Salesforce Dynamic Forms enhance user engagement and improve data quality by allowing users to customize the form fields and sections displayed to users on a page layout.

Benefits of using Salesforce dynamic forms

Flexible Field Placement

Users can place fields and sections wherever they prefer on a page, offering greater control over layout design.

Instant Upgrade from Page Layouts

Dynamic Forms allow for an instant upgrade from traditional page layouts, providing the flexibility to arrange fields and sections in a way that meets user needs.

Visibility Rules

Users can set visibility rules to show or hide fields and sections based on specific conditions, adapting forms to the preferences or requirements of individual users.

Simplified Layout Management

Dynamic Forms simplify layout management by enabling users to control fields and sections directly within the Lightning App Builder, eliminating the need for page layout editor adjustments.

Reduced Complexity

By using component visibility rules to manage which fields are displayed, Dynamic Forms help reduce the number of page layouts and record types, streamlining the form-filling process.

Single Assignment Model

Dynamic Forms offer a single assignment model for the Lightning page, as opposed to the dual model of assigning both a Lightning page and a page layout, making the process more intuitive and less complex.

Dynamic forms Salesforce release notes

Winter 23

The three core objects that now have dynamic forms available:

  • Accounts (both Business and Person)
  • Contacts
  • and Opportunities

With dynamic forms, you can migrate the fields and sections from your page layouts as individual components. This is a great way to keep your data organized and tidy.

Salesforce dynamic form updates in Oct 2022

You can see these enhancements in October 2022.

Spring 23

In the Spring 23 release of Dynamic Forms in Salesforce, a new feature has been added that allows users to include a save option when creating, editing, or cloning a case or lead, or when editing an account. This save option allows users to trigger territory assignment rules when saving a new lead, for example. Previously, this option was only available on page layouts.

Dynamic forms in Salesforce - Option for create, edit and clone

This change is available in Lightning Experience in Group, Professional, Enterprise, Performance, Unlimited, and Developer editions. The save option appears in the footer of the create, edit, or clone dialog box.

Winter 24

Dynamic Forms for Standard Objects and Mobile

Previously, Dynamic Forms in Salesforce were only available for desktop users. However, starting with the Winter ’24 release, Dynamic Forms are now accessible for both desktop and mobile users

The feature allows users to :

  • Add/remove fields
  • Create multiple sections
  • Set visibility rules for fields directly in the Lightning App Builder.
Dynamic Forms for Standard Objects and Mobile

Use Dynamic Forms on LWC-Enabled Standard Objects

In the Winter 24 release, Salesforce now supports Dynamic Forms on hundreds of LWC-enabled standard objects.The feature enhances page performance and provides visibility rules to display only relevant fields for users. Previously, Dynamic Forms were limited to custom objects and a few standard objects.

Spring 24

Use Dynamic Forms on Pinned Region Pages

In the Spring 24 release, Salesforce now supports Dynamic Forms on Lightning pages that use pinned region page templates. This update allows you to create and customize fields in the same way as on non-pinned region pages.

  • Create a page in the Lightning App Builder using a pinned region template.
  • Add a Field Section component.
  • Drag and drop the desired fields into the section.
Use Dynamic Forms on Pinned Region Page

Summer 24

Use Blank Spaces to Align Fields on Dynamic Forms

In the Summer 24 release, Salesforce allows users to enhance the UI of Dynamic Forms by adding blank spaces to separate fields vertically within a field section.This feature addresses the challenge of vertical field alignment and helps to create a cleaner, more appealing page layout.

Use Blank Spaces to Align Fields on Dynamic Forms

Add New Custom Fields to Dynamic Forms-Enabled Pages

In the Summer 24 release, Salesforce has introduced a new feature that simplifies the process of adding custom fields to Dynamic Forms-enabled pages. This update allows you to easily add new custom fields by using an additional step in the custom field creation wizard.

Add New Custom Fields to Dynamic Forms-Enabled Pages

Winter 25

Enable Dynamic Highlights Panel and Dynamic Forms on Mobile with One Click

In the Winter 25 release, Salesforce has expanded the Dynamic Forms functionality to mobile devices by adding support for the Dynamic Highlights Panel. With just one click, you can give mobile users access to the same Dynamic Forms fields and Dynamic Highlights Panel that desktop users see on their record pages.

Enable Dynamic Highlights Panel and Dynamic Forms on Mobile with One Click

How to Create Dynamic Form in Salesforce

How to create Dynamic forms in Salesforce?

Total Time: 10 minutes

  1. Navigate to Setup

    Go to Setup in Salesforce.

  2. Create a New Lightning Record Page

    New Lightning Record

    Navigate to Lightning App Builder: In Setup, use the Quick Find box to search for ‘Lightning App Builder’.
    Click on New: Select ‘Record Page’ and then click ‘Next’.
    Select an Object: Choose the object for which you want to create a dynamic form (e.g., Account, Contact).
    Choose a Page Template: Pick a page template that fits your needs and click ‘Finish’.

  3. Add Fields and Components to the Page

    Drag and Drop Fields: In the Lightning App Builder, you’ll see a new tab for ‘Fields’. You can drag and drop fields onto the page layout.
    Add Other Components: You can also drag other components (like related lists, custom components, etc.) onto the page.

    Select a Field: Click on the field you’ve added to the page layout.
    Set Visibility Rules: On the right-hand side, you’ll see ‘Set Field Visibility’. Here, you can add filter conditions to show or hide the field based on specific criteria (e.g., values of other fields).

  4. Save and Activate the Page

    Save the Page: Once you’re satisfied with the layout and configuration, click ‘Save’.
    Activate the Page: Click on ‘Activate’ to make the page available for use. You’ll have options to set it as the default for the entire organization, specific apps, record types, or profiles.

    Before this step, you can also do this
    Configure Actions and Filters (Optional)
    Add Actions: You can add actions like Quick Actions, Standard Actions, and Custom Actions to the page.
    Set Filters for Components: Similar to field visibility, you can set filters for entire components to display based on certain criteria.

  5. Test Your Dynamic Form

    Navigate to the Object: Go to the object you created the dynamic form for and open a record.
    Verify Functionality: Ensure that the dynamic form behaves as expected with fields showing or hiding based on the criteria you set.

Making fields required or read-only in dynamic forms

In the Salesforce Dynamic form, you can set a field as required or read-only to ensure that certain data is entered or to prevent users from modifying certain information.

There are two ways to set the required or read-only status of a field:

  • Field definition level in the Object Manager.
  • Page layout level in the Lightning App Builder.

Setting Required or Read-Only Fields at the Field Definition Level

  1. Navigate to Object Manager in the Setup menu.
  2. Select the Object that contains the field you want to modify.
  3. Click on the Fields & Relationships tab.
  4. Find and select the field you want to modify.
  5. Under the General Settings section:
    • Set Required to “Yes” to make the field required.
    • Set Read-Only to “Yes” to make the field read-only.

Notes : once a field is set as required at the field definition level, its Required value cannot be changed in the Lightning App Builder property panel.

Additionally, some standard fields, such as Created By, Last Modified By, Owner, and Record Type, cannot have their read-only status changed in the Lightning App Builder property panel.

Setting Required or Read-Only Fields at the Page Layout Level in Lightning App Builder

  1. Navigate to Lightning App Builder in Setup.
  2. Select the page layout you want to edit.
  3. Select the field you want to modify and open its properties in the property panel on the right.
  4. Under Field Settings, choose:
    • Set Required to “Yes” to make the field required.
    • Set Read-Only to “Yes” to make the field read-only.

Limits of Dynamic Form in Salesforce

Browser Compatibility

Dynamic Forms do not work in Internet Explorer 11. They are not supported on pages based on pinned region templates or custom templates.

Blank Spaces

Dynamic Forms do not support the use of blank spaces.

Field Section Limits

You can only add up to 100 fields per column in a field section component.

Migration of Page Layouts:

When migrating to Dynamic Forms, only fields and sections containing fields are included. If a page layout has too many fields and sections, some may be dropped during migration.

Field Section Expansion

Users can only expand or collapse field sections in view or inline edit mode.

Record Details in Certain Actions

For actions like creating, editing, or cloning opportunities, or using Clone with Related, the record details from the page layout are used, even if the page uses Dynamic Forms.

Automated Account Fields

If you have the Automated Account Fields setting enabled, the account create, edit, and clone windows also use record details from the page layout

Territory Rules on Save

The Evaluate this account against territory rules on save option is not supported in Dynamic Forms.

Additionally, explore more limitations of Dynamic Forms.

Dynamic External Form Solutions

If you want to collect data from an external public form and store it directly in Salesforce, we’ve provided some resources below to help you push data from the web form into Salesforce.

Learn how to create and set up dynamic forms using FormAssembly within Salesforce.

Learn how to use the Gravity Forms WordPress plugin to integrate dynamic forms with Salesforce.

Explore different types of Salesforce Web Forms that can be used to collect data from visitors or leads.

Explore various methods to create web forms in Salesforce.

Conclusion

Dynamic forms in Salesforce provide a powerful tool for customizing record pages and streamlining data entry for users. By using dynamic forms, you can create intuitive and efficient layouts that help your users quickly and accurately enter data. However, there are also certain limitations and considerations to be aware of when working with dynamic forms, such as support for certain browsers and objects, and the number of fields that can be included in a field section.

Resources for further learning

If you want to learn more about dynamic forms in Salesforce, there are a number of resources available to help you get started. The Salesforce Help documentation contains detailed information on dynamic forms, as well as best practices and troubleshooting tips.

Additionally, Trailhead offers a structured learning path with modules and hands-on challenges to guide you through Dynamic Forms in Salesforce.

Frequently Asked Questions (FAQs)

What is a dynamic form in Salesforce?

Dynamic Forms in Salesforce allow users to move fields or sections from page layouts into individual components. This can be further configured into the Lightning UI Builder.

How do I use the dynamic form in Salesforce?

Dynamic Forms can be used in two ways:
1. Creating a Lightning page from scratch and dragging Field and Field Section components onto it. 2. Migrating an existing record page’s details using the migration wizard.

What are the benefits of using dynamic forms?

Key benefits include:
1. Place fields and sections wherever needed.
2. Use visibility rules to show or hide fields dynamically.
3. Simplified layout management.
4. Reduced need for multiple page layouts

Which Salesforce editions support dynamic forms?

Dynamic forms are available in Lightning Experience for Group, Professional, Enterprise, Performance, Unlimited, and Developer editions.

Can I use dynamic forms for all Salesforce objects?

No, dynamic forms are currently supported for custom objects and specific standard objects, including Accounts, Contacts, Leads, Cases, and Opportunities.

Can I control which fields are visible to different users?

Yes, Dynamic Forms let you set rules to show or hide fields and sections based on certain conditions. This helps you create forms that fit each user’s needs.

What is the difference between traditional page layouts and dynamic forms?

The main difference between traditional page layouts and dynamic forms is flexibility and customization.
With dynamic forms, fields and sections are separate components in the Lightning App Builder. This allows users to:
1. Easily move fields around.
2. Set rules to show or hide fields.
3. Use fewer layouts by controlling visibility dynamically.

How to Migrate a Page Layout to Dynamic Forms in Salesforce?

1. Open Lightning App Builder: Go to Setup > Lightning App Builder.
2. Edit Record Page: Select the record page you want to migrate (e.g., Account, Contact).
3. Use Migration Wizard: Click Upgrade Now on the Record Detail component or use the migration wizard.
4. Select Fields & Sections: Choose the fields and sections to migrate to dynamic forms.
5. Customize Layout: Drag and drop fields and sections, and add visibility rules.
6. Save & Activate: Click Save and Activate to make the page live.