English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

The form is an order form and there are TONS of field options. I only want the fields that have been filled in to be submitted in the email. Right now, ALL the fields are showing up in the email, whether they've been filled in or not. I've searched and search for tutorials and cannot find anything that deals specifically with this.

2006-07-19 08:31:14 · 3 answers · asked by juli_dee 2 in Computers & Internet Programming & Design

3 answers

My suggestion would be to run it through another page that processes the fields (probably with ifs or a switch) and then sends out the e-mail. I don't think there is a way to exclude a field with html, but i'm not sure.

-- Brady

2006-07-19 08:48:31 · answer #1 · answered by Brady 3 · 0 0

Since your using ASP, then in your script before you sendmail you need to validate the fields as in
dim myFirstName

MyFirstName=request.form("FirstName")

if MyFirstName<>"" then
'do something
else
'do something else
end if

I assume the body of the email is an appending of the form fields
you need to check for content and handle only those that have values.

2006-07-19 08:52:47 · answer #2 · answered by stratsandlespauls 6 · 0 0

Try looping through the field collection in your Request object and discard any empty fields.

2006-07-19 08:52:08 · answer #3 · answered by Kryzchek 4 · 0 0

fedest.com, questions and answers