Require "@" in a form field (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


JHawkins -> Require "@" in a form field (3/15/2001 14:00:00)

Is it possible to require the "@" symbol in a form field? I have an online registration set up and am amazed at what some are submitting as an email address.




hzarabet -> RE: Require "@" in a form field (3/15/2001 16:06:00)

I JUST found this script today. This may be the ticket:

http://javascripts.earthweb.com/dlink.resource-jhtml.72.1760.|repository||webdev|content|software|1998|07|22|JS_13410|JS_13410~xml.0.jhtml?cda=true

--------------------------------------------------------------------------------

good luck

------------------
www.Signingshotline.com lists EVERY upcoming athlete autograph appearance in the US and Canada

[This message has been edited by hzarabet (edited 03-15-2001).]

[This message has been edited by hzarabet (edited 03-15-2001).]





Dixiedi -> RE: Require "@" in a form field (3/16/2001 20:04:00)

In Form Field Properties, Choose to Validate.
From this dialog box you can choose "other" and type in the @ symbol.

This will require the @ symbol be within the text they type into the text area. This does not mean you will automatically start collecting valid email addresses, it just means whatever they put in there will have the @.

WEbsites that require an email address to enter is my favorite place for this: "notonyourlive@noemail.com"





KevinB -> RE: Require "@" in a form field (3/16/2001 13:19:00)

Dixiedi, that doesn't work. If you do what you just suggested then the ONLY character you are allowed to put in that field is "@".




Goober -> RE: Require "@" in a form field (3/16/2001 14:07:00)

You will need to Validate that form field.

Choose Text in the Data Type field. You will want to check Letters, Digits, and Other. In the Others box, enter the other characters, separated by commas, that are possible in e-mail addresses...@, -, _, ., etc.

Then above that, in the Display name field, type in E-mail address.

Sandy

------------------
www.alleghenyweb.com





JHawkins -> RE: Require "@" in a form field (3/16/2001 16:41:00)

I tried all that in the previous post and then filled the email field in with just my first name and the form took it without any error message.

url to my test form
http://da.state.ks.us/ar/draft/Janet/TestForm.htm





KevinB -> RE: Require "@" in a form field (3/16/2001 17:03:00)

The script that hzarabet found is the thing to use. I was able to add it my site with the proper code tweeking.

[This message has been edited by KevinB (edited 03-16-2001).]





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875