StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > Webmaster > Lounge (non-StatCounter related topics here!)

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 05-29-2005, 05:42 PM
Sharron's Avatar
Sharron Sharron is offline
Moderator
 
Join Date: Feb 2005
Posts: 7,058
Default How do you validate a mail form?

http://atfb.home.att.net/MFEntry2.htm my modified page



I am not quite sure how to validate the form section of this page. As I did not write the the code by hand, I copied and pasted then modified the code off the page my site provided.

This page does indeed work, I just would like it to be error and warning free in addition to being validated.

http://atfb.home.att.net/test/MFEntry.htm original page


Also would like to eventualy like to have this page open in a pop up window, that is exactly the size of the table, so it would appear to be a card or something, instead of a entire page with open area around it. Can that be done? And still validate if possible?
__________________






Don't argue with an idiot; people watching may not be able to tell the difference.
  #2  
Old 05-29-2005, 08:52 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,145
Default

OK, here you go. Look in the source code, as the form will not actually work from my site, without your images and form processor that you use.

I added an attribute to the form tag, which will work with the valdiaiton script.

*snip*
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.

Last edited by webado; 07-27-2009 at 02:05 PM. Reason: url gone
  #3  
Old 05-29-2005, 09:15 PM
jonra01 jonra01 is offline
Master Member
 
Join Date: Feb 2005
Location: Mississippi
Posts: 3,636
Default

You can take this validation further by checking for an @ in the email address. You can do the same with a phone number by checking for 10 digits. This doesn't mean someone won't enter mickeymouse@disney.com and 555-555-5555 for a phone number. That's why I never bother with form validation for simple contact forms. If someone wants to leave a field empty then so be it. It's not like I'll have to wade through hundreds of invalid form submissions per day.

Business forms are a completely different kettle of fish. Some forms, like quote requests, have required fields or the results are invalid. These require some heavy duty validation routines. A form request for a sample cd would need to have a mailing address validation routine and an email validation so you could contact the user if there was a problem. Simple contact forms, on the other hand, don't really require validation - in my opinion.

John
__________________
John
  #4  
Old 05-29-2005, 09:18 PM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,145
Default

Well, this is just in order to prevent robots or pranksters from submitting them too easily.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #5  
Old 05-29-2005, 09:31 PM
jonra01 jonra01 is offline
Master Member
 
Join Date: Feb 2005
Location: Mississippi
Posts: 3,636
Default

Quote:
Well, this is just in order to prevent robots or pranksters from submitting them too easily.
Yes, I looked at the code and saw that it was checking for blank fields. It certainly serves the need for this purpose.

This just gave me a chance to pontificate on something I believe is a non-issue. Has anyone here ever had multiple blank submissions from their contact form? Form validation on something like this seems like a solution looking for a problem.

I've always felt that you should make things as simple and painless for the user as possible. Let's say someone wants to send a comment to Sharron about her site, like "great site!". Should they really have to fill in the name and email fields to do it? Maybe, someone would want to send their name and email address without comments. Or their email address and a comment and put their name in the comment field. It all depends on whether you want to control the user instead of letting the user control their own online experience.

John
__________________
John
  #6  
Old 05-29-2005, 09:34 PM
Sharron's Avatar
Sharron Sharron is offline
Moderator
 
Join Date: Feb 2005
Posts: 7,058
Default

Chris love the little pop up 'Thank you". That little addition is so nice. Thank you!


Jonra, what if someone wants to send me nasty stuff, and I want to respond? If they don't have to send email addy and such, I would be left to stew in my own juices. Of course I have not tested to see if they can get around that by using an invalid email addy.


http://validator.w3.org/check?uri=ht...rron-form.html

haha I am not sure, but I think we are on different pages. You I think , are talking about validating the form, what to see if it works or something else. I did validate it using the form validation on (dare I say FP)

I know it works to send me email, anything else I dont know.

I was initally referring to the WC3 validation. It won't validate, because I think of the form information.

By the way, I think I have acheived compliant pages, don't know wheather or not to trust that, so I keep going back and checking. Seems so. This mail form page will be the only page that does not validate with WC3 html transitional.

And before someone mentions the fact that I have no keywords, descriptions and the like. I had them, but for some reason had to delete them to validate. (I used alleycode to generate those.) Will have to attempt it again.

http://atfb.home.att.net





Now if I just don't mess things up when I add additonal content. Discovered you have to validate if you make even the slightest of changes.

Jonra, I altered FP, and think I removed its ability to add front page extensions. It has done something as I can no longer upload via FP.

Please someone tell me I am doing something right.
__________________






Don't argue with an idiot; people watching may not be able to tell the difference.
  #7  
Old 05-29-2005, 09:56 PM
jonra01 jonra01 is offline
Master Member
 
Join Date: Feb 2005
Location: Mississippi
Posts: 3,636
Default

Guess I made an 'invalid' assumption. I wondered if you were talking about validating the form inputs or validating the html, since you have been working on that on your other pages. Oh well, no harm done.

This page will validate with a few minor changes. You need to add this line in the head - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

You have a couple of elements that have <center> where it shouldn't be - <h1><center>...</center></h1> change that to <h1 align="center> and get rid of the center tags or reverse the order of the tags - <center><h1>...</h1></center>

Delete the <pre> and </pre> tags on the page. These aren't doing anything for you. The error it returns for these is because <pre> means preformatted text and you can't use a font tag to format it inside of a <pre> section.

That should take care of all of the errors.

John
__________________
John
  #8  
Old 05-29-2005, 11:06 PM
Sharron's Avatar
Sharron Sharron is offline
Moderator
 
Join Date: Feb 2005
Posts: 7,058
Default

http://atfb.home.att.net/MFEntry.html

Ok it is working and validated! Had to take off the statcounter code for now, it would not validate <noscript> something or others. Could not get that off and it work so bye bye.

I will work around it and see if I can work it out.

Nice work guys and thank you so much!

Now on the adding some links to the links page. Tried to to that a bit ago and in-validated the page.



I don't suppose I will find a easy way to do it......
__________________






Don't argue with an idiot; people watching may not be able to tell the difference.
  #9  
Old 05-30-2005, 12:20 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,145
Default

The only problem with the statcounter code would have been if you broke the lines or attempted to format them using whatever you're using.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
  #10  
Old 05-30-2005, 01:31 AM
Sharron's Avatar
Sharron Sharron is offline
Moderator
 
Join Date: Feb 2005
Posts: 7,058
Default

ok copied and pasted again the stat code. then ran the validator again.

It had an issue with this </p> at the end of the code so I deleted it and now it works.

Thanks again. Really.......
__________________






Don't argue with an idiot; people watching may not be able to tell the difference.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.