HTML & CSS
Is there a way to make a reset form
a text link instead of a button?
As AutisticCuckoo already said, and I contribute with a "link"-styled button example: (but don't use inline styling, its not semantic and pseudo-classes are unvailable)
<input type="reset" value="Delete All Values" style=" background:transparent; color:blue; text-decoration:underline; cursor:pointer">
The snippet erik.j posted works fairly well, although adding a border:none will get rid of the button's outline. Seems OK in IE and Firefox, but Opera doesn't show the text underline for some reason.
Thanks for testing it, I was too lazy and didn't think of the borders and probably there still is the 3D effect that my lazy inline style doesn't remove.
Here's a question for you - do you really need a reset button/link at all? Why would a user need to reset a form?
Personally I've never reset a form - I HAVE however hit the reset button by accident quite a few times and then had to re-enter all the information!
Other than testing them to see if they worked, I think the only time I have ever "reset" was to clear radio buttons that didn't have a "none" option.
I can't really see where I would want to use one otherwise, unless I totally messed up in a simple form and wanted to wipe it. I usually go back to the input with the mistake and fix it rather than wipe the entire form (when I don't miss the mistake before submitting).
I prefer sticky forms (where the information is not wiped after submitting). The only use of a clear button is if the user needs to fill the form out over and over again, which is very rare, I would have thought.
This topic is now closed. New replies are no longer allowed.