I have a requirement where I need to submit a feedback I am having two fields: NAME, FEEDBACK I am using the record edit form in LWC and there are other fields for feedback which are lookup fields of the parent object(these fields were not mentioned in the record edit form) now my requirement is on clicking the submit feedback button, it need to submit values of lookup fields from background using onsubmit event in js function, as I am new to lightning web component , please help me how to set the values of feedback's look up field values.

thanks in advance


You can handle that the onsubmit event of the record-edit-form. HTML



   event.preventDefault();       // stop the form from submitting
   const fields = event.detail.fields;
   fields.Name = 'name';
   fields.Feedback__c = 'feedback';

See the document for more details

  • thanks for the solution – akhil Feb 17 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.