You need to sign in to do that
Don't have an account?
Rasbehari Das
How to reset lightning-record-edit-form filed (lightning-input-field) after submited
First time I am submitting the form this is ok.
The second time I am opening a pop-up model but the fields are not resetting.
I am using this code like this.
handleReset() {
const inputFields = this.template.querySelectorAll('lightning-input-field');
if (inputFields) {
inputFields.forEach(field => {
field.reset();
});
}
}
But this is not working.
Please help me
Thanks
The second time I am opening a pop-up model but the fields are not resetting.
I am using this code like this.
handleReset() {
const inputFields = this.template.querySelectorAll('lightning-input-field');
if (inputFields) {
inputFields.forEach(field => {
field.reset();
});
}
}
But this is not working.
Please help me
Thanks
Review below links which can help you in resetting fields after submit.
https://salesforce.stackexchange.com/questions/252323/how-do-you-change-the-value-of-a-lightning-input-field-in-javascript
https://salesforce.stackexchange.com/questions/292393/reset-the-lightning-input-to-its-default-value
Thanks,