function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deepak Kumar 816Deepak Kumar 816 

My form is getting refreshed while clicking on submit button. I am using <form> in Lwc. How to stop that behaviour ?

Best Answer chosen by Deepak Kumar 816
Prateek Prasoon 25Prateek Prasoon 25
please use event.preventDefault() at the beginning of the function of submit button.
If you find this answer helpful,Please mark it as the best answer.