CUSTOM ERROR TEMPLATES


Configuring the Personalized Required Error Template Module

Note: This section only needs to be configured if you are not using the "Default Error Template ". Therefore this section will only be pertinent if in bizmail.cgi you set $use_html_error = "1";

First, this module only comes into play:

1. If you use the hidden "required" field
2. If any of the "required" fields are not filled in.
3. If you have $use_html_error = "1"; [SET IN bizmail.cgi]


Here is the way the "Personalized Required Error Template Module" works.

When a form is posted which contains blank entries, that is a “required” form field, the POSTER will be sent to the "Required Error Module" (IF $use_html_error = "1"; is set in bizmail.cgi.) This script will pull up the errorform.html, (OR THE HTML ERROR PAGE TEMPLATE SELECTED WITH THE HIDDEN FIELD name="error_page") and then replace all tags, which are explained below, with appropriate formatting. This HTML error form can also contain the look and feel of your current web site, so it will look as if they never left the site. The form will appear on the same page as the error message. The error message will indicate which form fields have not been filled in.

Read below to find instructions on how to configure the errorform.html or other HTML error form templates you want to use.

There would be the following corresponding formatting tags for each field in the HTML form.

1. Personalization Tags

...There are four types of of personalization tags.

a. Real Value - Example: <%FORMNAME%>
THHE FOLLOWING TAG IS USED TO RETRIEVE THE VALUE OF TEXT INPUTTED INTO THE HTML FORM FIELD
(which in this example would be name="FORMNAME")
<%FORMNAME%>


A good example of this functionality in your HTML error form:
<input type="text" name="FORMNAME" value="<%FORMNAME%>">

If the field name="FORMNAME" was filled with text (and upon posting the main HTML form, other required fields where left blank), The HTML error page would appear, The TAG EXPLAINED ABOVE would be converted to the inputted value.

Example:
If page one of form contained the field: <input type="text" name="FORMNAME" value="text">

The if the error page came up, and this tag <%FORMNAME%> was used; it would be converted to: text

<%FORMNAME%> IS ALSO THE TAG USED FOR <textarea></textarea> VALUES.

Example Field: <textarea name="comments"></textarea>

You would use: <textarea name="comments"><%comments%></textarea>

	b. Selected - Example: <%SEL%FORMNAME {_VALUE}%>
	NOTICE: there is an: _
                after: { 
                and before the VALUE of the selected item. (THIS IS A BUG FIX FROM V2.1)
	Example: If the field was a drop down select box: 
	<select name="FORMNAME">
	<option value="choice 1">choice 1</option>
	<option value="choice 2">choice 2</option>
	<option value="choice 3">choice 3</option>
	<option value="choice 4">choice 4</option>
	</select>

	The below tags in this example would equal " selected" if the option was selected.
	(REMEMBER THE _ BEFORE THE VALUE!!!)

	<%SEL%FORMNAME {_choice 1}%>
	<%SEL%FORMNAME {_choice 2}%>
	<%SEL%FORMNAME {_choice 3}%>
	<%SEL%FORMNAME {_choice 4}%>


SO FOR INSTANCE (if "choice 2" was selected on the previous page): THEN THE BELOW: (REMEMBER THE _ BEFORE THE VALUE!!!) <select name="FORMNAME"> <option value="choice 1"<%SEL%FORMNAME {_choice 1}%>>choice 1</option> <option value="choice 2"<%SEL%FORMNAME {_choice 2}%>>choice 2</option> <option value="choice 3"<%SEL%FORMNAME {_choice 3}%>>choice 3</option> <option value="choice 4"<%SEL%FORMNAME {_choice 4}%>>choice 4</option> </select>

WOULD BE CONVERTED TO REAL HTML TEXT OF: <select name="FORMNAME"> <option value="choice 1">choice 1</option> <option value="choice 2" selected>choice 2</option> <option value="choice 3">choice 3</option> <option value="choice 4">choice 4</option> </select>

c. Checkbox - Example: <%CK%FORMNAME%> Example: If the field was a check box: <input type="checkbox" name="FORMNAME" value="y"> The below tag in this example would equal " checked" if the field was checked. <%CK%FORMNAME%>

SO FOR INSTANCE, IF <input type="checkbox" name="FORMNAME" value="y"> was checked on the previous page: THEN THE FOLLLOWING FIELD WHICH INCLUDES THE TAG: <input type="checkbox" name="FORMNAME" value="y"<%CK%FORMNAME%>>

WOULD BE CONVERTED TO: <input type="checkbox" name="FORMNAME" value="y" checked>

d. RADIO Selected - Example: <%RADIO%FORMNAME {_VALUE}%> NOTICE: there is an: _ after: { and before the VALUE of the selected item. (THIS IS A BUG FIX FROM V2.1) Example: If the field was a drop down select box: <input type="radio" name="choices" value="1">Choice 1 <input type="radio" name="choices" value="2">Choice 2 <input type="radio" name="choices" value="3">Choice 3 <input type="radio" name="choices" value="4">Choice 4

The tags below would equal " checked" if the option was checked. (REMEMBER THE _ BEFORE THE VALUE!!!)

<%RADIO%choices {_1}%> <%RADIO%choices {_2}%> <%RADIO%choices {_3}%> <%RADIO%choices {_4}%>

if "2" was checked on the previous page, then the following tags: (Remember the _ before the value!) <input type="radio" name="choices" value="1"<%RADIO%choices {_1}%>>Choice 1 <input type="radio" name="choices" value="2"<%RADIO%choices {_2}%>>Choice 2 <input type="radio" name="choices" value="3"<%RADIO%choices {_3}%>>Choice 3 <input type="radio" name="choices" value="4"<%RADIO%choices {_4}%>>Choice 4

WOULD BE CONVERTED TO REAL HTML TEXT OF: <input type="radio" name="choices" value="1">Choice 1 <input type="radio" name="choices" value="2" checked>Choice 2 <input type="radio" name="choices" value="3">Choice 3 <input type="radio" name="choices" value="4">Choice 4

2. Missing Required BOLD field title tags.

a. Start Bold Tag. Example: <%B%FORMNAME%> If the form field, which in this example would be name="FORMNAME", is left blank, then this tag would be converted into the: <b> ...TAG The purpose is too bold the text of field descriptions that are required and not filled in.

b. End Bold Tag. Example: <%BE%FORMNAME%> The tag works just like the “a” example. However, this will convert to: </b> Which obviously ends the bold of the text for the field description.
A good example of this function in your HTML error form: <%B%FORMNAME%>Field Description<%BE%FORMNAME%> <input type="text" name="FORMNAME">

If left blank the HTML code would be converted to: <B>Field Description</B> <input type="text" name="FORMNAME">

3. Missing Required YELLOW highlighted input field tag.

Example: <%REQ%FORMNAME%> If the form field, which in this example would be name="FORMNAME", is left blank, this tag will be converted into: style="background: #ffff00" The purpose is so you can HIGHLIGHT IN YELLOW the background color of the field on the HTML error page if the field is left blank.

A good example of this function in your HTML error form: <input type="text" name="FORMNAME"<%REQ%FORMNAME%>>

If left blank the HTML code would be converted to: <input type="text" name="FORMNAME" style="background: #ffff00">