Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form field

Status
Not open for further replies.

aarellano

MIS
Oct 22, 2007
168
US
I have a form that is submited asking for order numbers

My field looks like this
Code:
<input type="text" name="ORD" value="" size="32">

the problem that I am having is that people need to enter a letter before the number. The letter is always the same, will never change. Some people forget to type the letter and when trying to find the data we run into problems. So is there a way to add the letter to the input?
so when the user types "12345"
it will insert "S12345
 
Agreed its simple to do in whichever server side script your are using. Exactly what server side language are you submitting the form to?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
asp

so would something like this work
Code:
<input type="text" name="ORD" value="" size="32"<%if rs.in("ord").value between 0,9 then response.write(S(rs.in'ord'))%>>
 
Don't know, ASP is not my strong point, and of course this is now outside the scope of this forum. You might want to ask this in the ASP forum here: forum333



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
sorry about that did not mean to post something in the wrong place. I will move to the forum333: Microsoft: Active Server Pages (ASP)

thank you for all the help, I have a better idea in what to do
 
If all your order numbers start with an S, I suggest you do it the other way round and suggest users type in just the number bit. Why get them to waste time typing this unnecessary character?

Either way, though, the solution is the same - check server-side for the S and add it if it's missing.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top