SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1  
Old 01-26-2006, 01:21 PM
Molly Molly is offline
SEO Junior
 
Join Date: Sep 2005
Location: London
Posts: 11 Molly is on a distinguished road
How do I make fields mandatory on a form?

Hi I have a contact us form that emails me when submitted. However I want to make one of the fields mandatory so that if it isn't filled in it won't let you submit the form. However I not sure how to do it. Could anyone point me in the right direction?

Molly
__________________
Sorry spelling not my strong point!
Reply With Quote
  #2  
Old 01-26-2006, 02:17 PM
dilligaf's Avatar
dilligaf dilligaf is offline
SEO GUY Moderator
 
Join Date: May 2004
Location: Tampa Bay
Posts: 2,847 dilligaf has a spectacular aura aboutdilligaf has a spectacular aura about
Reply With Quote
  #3  
Old 01-26-2006, 02:39 PM
Molly Molly is offline
SEO Junior
 
Join Date: Sep 2005
Location: London
Posts: 11 Molly is on a distinguished road
Cheers I'm going to try the second one.
__________________
Sorry spelling not my strong point!
Reply With Quote
  #4  
Old 03-25-2006, 04:57 PM
mikhail mikhail is offline
SEO Junior
 
Join Date: Sep 2005
Posts: 2 mikhail is on a distinguished road
Don't forget that JavaScript validation is non-existent if someone wants to copy your page and fiddle the Javascript before they submit the form. Server-side validation is the only reliable validation. Maybe this isn't a serious issue in your case. Something to consider where authentication and money is involved.
__________________
Linux Consultant Alice Springs
Reply With Quote
  #5  
Old 06-19-2006, 04:44 AM
JONES's Avatar
JONES JONES is offline
SEO
 
Join Date: Jan 2006
Posts: 268 JONES will become famous soon enough
It depends on whether you are making the form in asp.net or php
Reply With Quote
  #6  
Old 06-19-2006, 08:18 AM
jlknauff's Avatar
jlknauff jlknauff is offline
SEO GUY Moderator
 
Join Date: May 2004
Location: In perpetual style
Posts: 3,305 jlknauff is on a distinguished road
Quote:
Originally Posted by mikhail
Don't forget that JavaScript validation is non-existent if someone wants to copy your page and fiddle the Javascript before they submit the form. Server-side validation is the only reliable validation. Maybe this isn't a serious issue in your case. Something to consider where authentication and money is involved.

Uh...no. They can not modify the script becuase it is on your server. Downloading and changing it will have no affect because the form pulls it from the server.
__________________
Business Forum

Marketing Tips
Reply With Quote
  #7  
Old 06-27-2006, 12:58 PM
ixpleo's Avatar
ixpleo ixpleo is offline
SEO Junior
 
Join Date: Jun 2006
Posts: 22 ixpleo is on a distinguished road
Quote:
Originally Posted by jlknauff
Uh...no. They can not modify the script becuase it is on your server. Downloading and changing it will have no affect because the form pulls it from the server.

I think what mkhail meant was that you can copy and paste the code, make changes, and upload to your server. Then set the action on the form to a full path, for example: http://www.someoneelsessite.com/process.php

Most forms don't verify that the HTTP_REFERRER was in fact not an external site. All someone would be doing is posting the form variables to your script, and bypassing any sort of javascript validation.

A little unlikely, yes, but it is possible.
Reply With Quote
  #8  
Old 06-27-2006, 01:20 PM
Paz's Avatar
Paz Paz is offline
SEO GUY Moderator
 
Join Date: Sep 2004
Location: Antalya, Turkey
Posts: 4,111 Paz has a spectacular aura aboutPaz has a spectacular aura about
Quote:
Originally Posted by ixpleo
<snip> Most forms don't verify that the HTTP_REFERRER was in fact not an external site. All someone would be doing is posting the form variables to your script, and bypassing any sort of javascript validation.

A little unlikely, yes, but it is possible.

Good point, but actually, it's not so unlikely. A lot of spammers who can't get hosting are using this backdoor method to send unsolicited emails.
__________________
10.3 million entries for Hotels in Turkey but I'm still chipping away.
Reply With Quote
  #9  
Old 08-26-2006, 04:04 PM
jedicoder's Avatar
jedicoder jedicoder is offline
SEO Junior and a half
 
Join Date: May 2006
Posts: 69 jedicoder is on a distinguished road
Javascript is how you can validate the the fields were filled out on the client side. If you use PHP, PERL, ASP, or another cgi language, you could validate on the server side, but if you find a problem, your server side script will have to generate a page that shows a message to the user.

Javascript is the most popular option.
__________________
jedicoder
current seo efforts on Website Designer Search Directory and Grand Oak eCommerce Web Designer
Reply With Quote
  #10  
Old 08-26-2006, 04:41 PM
dilligaf's Avatar
dilligaf dilligaf is offline
SEO GUY Moderator
 
Join Date: May 2004
Location: Tampa Bay
Posts: 2,847 dilligaf has a spectacular aura aboutdilligaf has a spectacular aura about
Quote:
Originally Posted by Molly
..I want to make one of the fields mandatory so that if it isn't filled in it won't let you submit the form..




















































































































































.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 06:04 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.