is there a way in which i could create light grey text that disappears when a textbox is on focus?
Currently, i have text written in the textbox but i have to select the text and manually delete it (somewhat annoying…)
I know i can do something when i get focus on the box (using events) however, i don’t want it to clear the text every time the user selects that box… rather just the first time. In other words, i just want the hint text to disappear (not the text they enter if they were to select the box after typing in it once)…
I also realize i could use something like a counter to keep track of if it’s the first time that box is being clicked on.. however, i was looking for a cleaner way to do this…..
Something like the code below.
Please note, this is not a compiled code. Just sharing the idea, plus you may like to retain the default settings if user did not enter any text. For that handle a lost focus and reset to default.
}