I am working on a small stock management project. After adding an item into the database, the reset button stops working. I was able to reset everything except the html-5 date attribute and checkbox using javascript as such
$form.find('input:text, input:password, input:file, select,textarea').val('');
$form.find('input:radio, input:checkbox, input:dropdown').removeAttr('checked').removeAttr('selected');
So, i'm trying to reload the page altogether using
location.reload(true);
But, now it prompts asking to resubmit the form. What could be the solution to this? Is there any other way to reset the form?
Sorry, i'm new to programming. I'll appreciate your help.