General comments
You need to add some additional coding or change some of your current coding, if email is not a field on your form at all or is not required. For example, I could create a form for anonymous feedback, and thus an email field would not be on your form. Or I could be collecting information for subscribers to a printed newsletter or to get an application form, and the person filling out the form may not either have an email account or may not want to give out his/her email.
If email is not a field you are collecting
If you do not have email as a field at all, you need to add another HIDDEN INPUT statement in your form. This is the line you need to enter:
<INPUT TYPE="hidden" NAME="email" VALUE="nobody@ag.arizona.edu">
It does not matter where in the series of HIDDEN INPUT statements this is placed. It just needs to be inside the form area.
If email is an optional field
If email is optional, then you need to do a couple of things.
- You need to add this HIDDEN input statement in your form:
<INPUT TYPE="hidden" NAME="email" VALUE="nobody@ag.arizona.edu">
- Because you are now using the field name of email some other place in your form, you must change the field name for your optional email field to something like email-response or email-entry. This new email field name must also be used in your email template, as is shown here:

There is a tremendous disadvantage of letting email be optional. Even if someone types in their email, the name that is associated in the FROM part of the email message will be nobody@ag.arizona.edu. The email typed in by the user when the field is optional will be sent back to you in the email message you get, but not in the FROM line. This means, unfortunately, that you cannot use the REPLY feature in your email program to send a message back to the person posting the message.
This document is part of a set of tutorials related to putting a form on your website. The initial page is found at cals.arizona.edu/ecat/forms/olderforms.html