In this post we will see, how to create New& Edit form in single lightning web component, which is having both lightning-input and lightning-input-field tags.
In this approach i am using below things to create and edit the account record using LWC
- Using uiRecordApi to create and update the record
- Using combination of input and input-field for fast implementation
- Update the field value with onchange event. we can use data-field on all fields for getting the field values
- Differentiate the page type whether it is new or edit based on recordId
- By creating the aura component will override the standard edit and new button