Design comparison
SolutionDesign
Solution retrospective
Some alignment issues, re-set button submits and clears fields instead of just clearing
Community feedback
- @DCoder18Posted over 2 years ago
Hi Pete, Good attempt. The reason why your reset button submits is because you added
submit
to thetype
attribute. You don't need this here unless your sending data to an external page. Instead, set it as<input type="button">
.For the reset button, try using a separate reset function. In that function, you can set all your variables like
bill
,tip
,people
etc. to0
.0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord