Activity › Forums › Salesforce® Discussions › What are the difference between the Lightning:input and Lightning:inputField?
-
What are the difference between the Lightning:input and Lightning:inputField?
Posted by Shweta on August 6, 2020 at 3:12 PMWhat are the difference between the Lightning:input and Lightning:inputField in Salesforce lightning?
GetOnCRM replied 4 years, 5 months ago 4 Members · 4 Replies -
4 Replies
-
@shweta
lightning:input –> Accepts the values which you entered of type attribute. for example when you give type with email, it accepts with type email value. reference link : https://developer.salesforce.com/docs/component-library/bundle/lightning-input/example
lightning:inputfield –> Accepts the values with the mode of edit with pencil icon and should be used in forms like recordEditForm.
Refer this link for more information and give a like if its helpful for you and to let others that its useful. : https://developer.salesforce.com/docs/component-library/bundle/lightning-input-field/documentation - [adinserter block='9']
-
@shwetalightning:input –> Accepts the values which you entered of type attribute. for example when you give type with email, it accepts with type email value. reference link : https://developer.salesforce.com/docs/component-library/bundle/lightning-input/examplelightning:inputfield –> Accepts the values types automatically by specifying field-name attribute and can be used in forms.Refer this link for more information and give a like if its helpful for you and to let others that its useful. : https://developer.salesforce.com/docs/component-library/bundle/lightning-input-field/documentation
-
This reply was modified 4 years, 9 months ago by
thanuja undralla.
-
This reply was modified 4 years, 9 months ago by
-
Hello Shweta,lightning-input: Represents interactive controls that accept user input depending on the type attribute. A lightning-input component creates an HTML <input> element.Find the more info: https://developer.salesforce.com/docs/component-library/bundle/lightning-input/documentation lightning-input-field: Represents an editable input for a field on a Salesforce object. Use the lightning-input-field component in lightning-record-edit-form to display and edit the value of a record field of a Salesforce object. Use the field-name attribute to specify the API field name. Find more info: https://developer.salesforce.com/docs/component-library/bundle/lightning-input-field/documentationHope this helps.Thanks.
-
lightning:input is to represent interactive controls that accept user input depending on the type attribute.
lightning:inputField is to represent an editable input for a field on a Salesforce object.
Log In to reply.