The lightning-record-edit-form has a documented
submit method that I assume can produce similar behavior to a click on a nested submit button. But I can't find any examples of this.
The documentation describes a
fields argument for the
submit method of:
Submits the form using an array of record fields or field IDs. The field ID is provisioned from @salesforce/schema/. Invoke this method only after the load event.
When no argument is supplied to
submit, features like required field validation does not work. I'm not in a position to test right now so am wondering:
- If the fields are hard-coded as the
submitargument, does the expected behavior result?
- Can the field names specified in the nested
lightning-input-fieldelements be programmatically obtained? (I note that
field-namesproperty but that is documented as "Reserved for internal use. Names of the fields to include in the form.".)