X
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 87,407 times.
Learn more...
Want to give your visitor the ability to clear all form data they entered? This article will give you the code to input the button they'll need to clear their data.
Steps
-
1Create an HTML form with the <form> tag.
-
2Create several options that the user can type in information or click a selection button, or do something.Advertisement
-
3Create your reset button. Type the <input type="reset"> tag into the code towards the top and/or bottom of the HTML form.
-
4Close the form after all input fields are entered with a final </form> tag.
-
5Save and preview your new adjusted form with the new reset button. Try it out, to see if it works correctly; click a selection or type a value and then click the reset button.
Advertisement
Community Q&A
-
QuestionI have done the coding right, but the reset won't work. What should I do?Community Answerif you are trying to reset the HTML form's fields by clicking a button, you should call a javascript function through that button and, in that function, you would be able to access all HTML forms' input fields and reset them to whatever you want.
Advertisement
About This Article
Advertisement