lonewolf217 Posted August 14, 2008 Share Posted August 14, 2008 I can prepopulate a text field like this <input type="text" name="query" maxlength="100" size=75 value="Enter your search string here"> but is there an easy way that I can clear the prepopulated text when the user clicks in the field ? Quote Link to comment https://forums.phpfreaks.com/topic/119648-solved-form-text-field-question/ Share on other sites More sharing options...
adam84 Posted August 14, 2008 Share Posted August 14, 2008 <input type="text" name="query" maxlength="100" size=75 value="Enter your search string here" onfocus="this.value='';"> Quote Link to comment https://forums.phpfreaks.com/topic/119648-solved-form-text-field-question/#findComment-616412 Share on other sites More sharing options...
lonewolf217 Posted August 14, 2008 Author Share Posted August 14, 2008 very nice, thanks Quote Link to comment https://forums.phpfreaks.com/topic/119648-solved-form-text-field-question/#findComment-616419 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.