Creating a contact edit form using the Lightning input field and RecordEditForm components

For a contact edit form, you will need to provide the ID of the record that needs updating. The following example shows how to use the RecordEditForm component to edit a contact record:

<aura:component implements="force:hasRecordId,flexipage:availableForRecordHome">    <div class="slds-p-bottom_large slds-p-left_large" style="width:500px"> <Lightning:recordEditForm aura:id="recordViewForm"                                      recordId="{!v.recordId}"                                     recordTypeId="012R00000000000000"                                     objectApiName="Contact">            <Lightning:messages />            <Lightning:inputField fieldName="FirstName" />            <Lightning:inputField fieldName="LastName" />            <Lightning:inputField fieldName="Birthdate" /> <Lightning:inputField ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.