Jump to content

how can i clear the initial text value of a form when submitted?


tronithan
 Share

Recommended Posts

So I have a set of text fields that I will use as a bulk item # enter form. So that the customer can enter the item numbers in each and it will run through a serch engine to return the items they enter. I have the initial value set to "item #" and it disapears onFocus. But when the search is submited an item # is also submited in the search if one is not filled out and the search returns 3000 items. How can i get the form to ignore the initial values and just the text the customer enters?

Link to comment
Share on other sites

If I understand what you mean, you have a form input that has a sample text like "Enter search terms here" and when focused on, that text dissapears. But when you submit it, the text is still submitted along with what the user put in?It shouldn't do it if you are using this code in the onfocus= event of the form input.onfocus="this.value=''"It should clear it, and not submit it. Is that what you're doing?Hope that helps,Choco

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...