Web Hosting Talk







View Full Version : How do I make the sender input field required in a form


bklny43
03-03-2008, 05:52 PM
How do I make the sender input field required in a form without having it reply as nobody@domain.com. I have one part working which is to receive the form with the email address of the sender, but now I want this same filed to be a required field.

Here is the line code I am using.

<td align=right bgcolor="#e72264" width="60%" class="inputcontent2"> *Email Address</td><td width="4%"></td>

<td align="left"><input name='email' type=text size=20 maxlength=100></td>

Apprecaite any help!

Jay August
03-03-2008, 07:28 PM
Check with JavaScript if the form input has been filled in:

http://www.w3schools.com/js/js_form_validation.asp

Eiolon
03-06-2008, 09:47 PM
What language are you using to send the form? I ask because you should already be using some sort of validation to prevent spam, injection attacks, etc. Simple make sure the sender field is validated properly with your language and you are set.