Adding Reqired Fields

By default you do not have to enter any information in the fields before clicking the submit button.  If you would like to force your visitors to enter certain information, then you need to add a required field.  To do this, use the information provided in the example below to create a required field.

Example

Suppose you would like to force visitors to enter their email address in form before clicking the submit button.  By adding "req-" to the beginning of input name, you designate it as being a required field.

Email:     <input type="text" name="req-email" size="40">

Also, it may be nice to let your visitors know that a field is required, so you may want to edit the text, as shown below:

Email (required):     <input type="text" name="req-email" size="40">

Note: The input name (i.g."req-email"), may not have spaces in it.  Please use the underscore "_" character instead, or make it one word.

Adding the HTML code into the form

<!-- Begin Email Form Code -->
<form method="post" action="/_ihnextras/cgi/cgishell.exe?replytovendor">
<input type="hidden" name="recipient" value="user@domain.com">
<pre>
Name:     <input type="text" name="name" size="40">
Email (required):    <input type="text" name="req-email" size="40">
Subject:  <input type="text" name="Subject" size="40">
Comments:
<textarea name="comments" cols="40" rows="8"></textarea>
<input type=submit value="Submit" name="submit"><input type=reset name="reset">
</pre>
</form>
<!-- End Email Form Code -->

 Note: For user@domain.com, you will need to enter the email address where the form will be sent to.

What your visitor will see

If your visitor fails to put information in the required field, they will see the following message:

Form Incomplete:

Some fields on this form are required to be completed. Use the back button to return to the form and complete the entries.

How to Install

For instructions on how to add the code into your web editor please select your editor below:

Web Easy (Avanquest Software)
Web Studio (Back to the Beach Software)

Add Feedback