Creating hints inside of textboxes
Posted on 2013-06-26
I am looking to create text formfield hints within these form fields that disappear when a user clicks inside the formfield to add their data for submission.
For example, I have a form with a textfield for a user to enter their firstname. I would like to have the word 'Enter Firstname' inside the text field but have it disappear when the user clicks into the field to enter their first name. However, as I need to verify that the user has indeed entered some data, if the user submits the form without actually entering any firstname data, the form would be 'returned' to the page with an error message. How do I create this hint within the form text field and 'strip' it way during form submission so my form validation would still work?
Thank you so much for helping me with this issue that has been haunting me for so long.