Support Dynamic Creation of All Lightning Component Types (force:inputField) - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
1,550  Points
Idea has been posted. Give it an upvote or downvote.

Support Dynamic Creation of All Lightning Component Types (force:inputField)

Lightning Experience

When building an application in Lightning there is often a need to generate user interface elements dynamically. For example, if a user wants to customize the fields displayed on a screen then you would need to read that configuration and create each field component dynamically.

Lightning has the capability of creating components dynamically using the $A.createComponent method.

In many cases this method works, but certain core Salesforce components do not work. The largest gap is the force:inputField component.

The component allows you to generate the lightning input field for any Salesforce field type. Handling user input with standard UI components that match the rest of Lightning Experience is critical to many applications.  I've reached out to Salesforce support and have been told that this simply isn't supported in the Aura framework currently.

Right now the only alternative is to write code to support every field type including the complicated lookup field type. This is a lot of duplicated effort and will ultimately lead to a bad user experience as the third party and the Salesforce version of these inputs get out of sync.

Behind the scenes Salesforce must have the capability of creating these fields dynamically for the standard pages. Exposing that capability to developers would solve this issue.

Merge Idea · Flag

Latest Comment from Salesforce

  • Marcus Torres - 2 years ago

    We agree with you, this is an urgent need. Our plan was to deliver a lightning:inputField component in Winter '18 that does exactly this but edge cases are caysing us to delay this until Spring '18. However, we will still be releasing lightning:outputField in Winter '18.
  • Upvotes
  • Downvotes



from AppExchange


Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.