How can I refresh or reload a form using JQuery?
I am filling my form using session values. Using Jquery Post I unset session, but then the values are already filled in the form.
I am trying to reset all form values after un setting the session with the following code:
$('#form')[0].reset();
Yet it is not working after the $post ajax call.
Do you have this?
<form id="form">.....</form>
If you do, it should work. If you don't have an "id" for your form tag, you should use
$("form")[0].reset();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With