HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
how to ignore blank fields?
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
opheliajewellery



Joined: 30 Oct 2008
Posts: 1

PostPosted: Thu Oct 30, 2008 3:51 pm     how to ignore blank fields? Reply with quote

i am trying to setup a series of html forms (not php) that act as a catalogue, so i have a list of products with different options they can choose for each one...

however i've been searching the internet and all i can find is how to make alerts to notify users of blank fields - problem is that my forms are submitting ALL fields whether they've been used or not...

so in my case, if a client only chooses two items (and fills out the form information for that item) the email I receive still shows all the fields for every item...

example of the email i receive:

DC16-OPTION1 = on
DC16-COLOURS =
DC16-QUANTITY = 1

DC27-COLOURS =
DC27-QUANTITY =

DC28-OPTION3 = on
DC28-COLOURS = green
DC28-QUANTITY = 2

DC2-COLOURS =
DC2-QUANTITY =

DC22-OPTION2 = on
DC22-OPTION3 = on
DC22-COLOURS = blue, green, red
DC22-QUANTITY = 5

****

here is my code:

Colour Preference: <BR>
<input type="text" name="FS7-COLOURS" value=""><BR>
Quantity: <BR>
<input type="text" name="FS7-QUANTITY" value=""><BR>

****

as you can see it sends all the fields even though there is nothing written in them... how do you make it stop doing this? as all the fields are NOT required I'd rather they not show up if they aren't being used!

thanks
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1408
Location: Biloxi, MS

PostPosted: Sun Nov 09, 2008 9:25 pm     Reply with quote

See if you can use this: JavaScript Form Validation
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial