HTML FORM SETUP


Description: To process the form you will need specific fields. A list of all predefined fields are shown below.

This will show you how to create your HTML forms page or configuring the form.html example form page.


Predefined Function Form Fields
<form method="post">
<input name="subject">
<input name="success_page">
<input name="error_page">
<input name="required">
<input name="required_desc">
<input name="send_to">
<input name="cc_to">
<input name="bcc_to">
<input name="cell_to">
<input name="sort">
<input name="custom_message_format">
<input name="plain_custom_mesfile">
<input name="html_custom_mesfile">
<input name="cell_mesfile">
<input name="sendreply">
<input name="reply_subject">
<input name="email">
<input name="message_format">
<input name="plain_mesfile">
<input name="html_mesfile">
<input name="file_attachments">
<input name="SQL_write">
<input name="SQL_config">
<input name="sql_primary_key">
<input name="sql_encrypt_key">
<input name="outputfile">
<input name="datafile">
<input name="data_format">
<input name="text_qualifier">
<input name="check_duplicate">
<input name="field_descriptions">


<form method="post">

You need to start your form with the line below. It must appear before any other form fields. It represents the start of the form and calls the scripts in your cgi-bin.

<form method="post" action="/cgi-bin/bizmail.cgi">
OR
<form method="post" action="http://www.yourdomain.com/cgi-bin/bizmail.cgi">
Replace: http://www.yourdomain.com/cgi-bin/bizmail.cgi with the url to bizmail.cgi


^ TOP ^


<input type="hidden" name="subject">


"subject" is the subject line you will see when you receive the form results email.

<input type="hidden" name="subject" value="BizMailForm FORM DATA">


^ TOP ^



<input type="hidden" name="success_page">

"success_page" is the web page the form poster will be sent to after successfully completing the form. Leave this field blank or leave field out of the form to use the bizmail.cgi default success page.
<input type="hidden" name="success_page" value="http://www.yoursuccesspage.com/">

There is a eparate success.cgi module that can be used.
There are two modules; one powered by
MySQL and one that is powered by the flat file database.


^ TOP ^



<input type="hidden" name="error_page">

"error_page" is the field that specifies the personalized error page the form poster will be sent to if any errors arise in the form submission. The number inputted in this field will then correspond to what is configured by the $HTML_error_page{""} varribles in bizmail.cgi.

$HTML_error_page{"1"} = "formerror.html";
$HTML_error_page{"2"} = "next_formerror.html";
$HTML_error_page{"3"} = "etc_formerror.html";
Example: If you want to use "formerror.html" as your personalized error page, and the variables for $HTML_error_page{""} in bizmail.cgi is configured as shown above, then format the "error_page" field as shown in the example below:
<input type="hidden" name="error_page" value="1">

Note: This form field is only necessary if you set $use_html_error = "1"; in bizmail.cgi.


^ TOP ^



<input type="hidden" name="required">

"required" are all the fields you want to require the form poster to fill in. If a required field is left blank, the form poster will be sent to an error page notifying what fields they missed.

the value="" should contain a list of all required fields separated by a comma.

<input type="hidden" name="required" value="email,firstname,nextrequiredfield,etc">


^ TOP ^



<input type="hidden" name="required_desc">

"required_desc" are all the descriptions of the fields you want to force to be filled in. This works in conjunction with the hidden field "required". For every entry in the "required" hidden field there should be an associated corresponding entry in the "required_desc" hidden field.

the value="" should contain a list of all required descriptions separated by a comma.

The purpose of this field deals with the “required error” page that may come up in bizmail.cgi. Instead of just printing the field “name” that is missing, you can print the description of that field that may contain spaces. Therefore, you get red of the ugly underscores.

THIS FIELD IS OPTIONAL

FOR EXAMPLE IF THIS IS YOUR "required" HIDDEN FIELD BELOW:
<input type="hidden" name="required" value="email,firstname,nextrequiredfield,etc">

THEN YOUR "required_desc" HIDDEN FIELD SHOULD LOOK LIKE THIS:
<input type="hidden" name="required" value="Email,First Name,Next Required Field,Etc">


^ TOP ^



<input type="hidden" name="send_to">

"send_to" refers to the $sendto{"1"}, $sendto{"2"} etc... variables which are configured in
bizmail.cgi. What this means in laymen's terms if the send to section of your bizmail.cgi file looks like:

$sendto{"1"} = "you\@yahoo.com"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##
$sendto{"2"} = "you\@hotmail.com";


THEN USING <input name="send_to" type=hidden value="1">
WOULD SEND DATA TO "you@yahoo.com"

IF USING <input name="send_to" type=hidden value="2">
WOULD SEND DATA TO "you@hotmail.com"

ETC...

For the number that is chosen, that same configured number in bizmail.cgi is where form submission will be sent for that particular form. This is also used as the reply email address in the auto-response email sent to the form poster.
THIS FIELD MUST BE INCLUDED IN THE FORM FOR ANY EMAIL WHATSOEVER TO BE SENT

<input name="send_to" type=hidden value="1">


^ TOP ^



<input type="hidden" name="cc_to">

"cc_to" refers to the $cc_to{"1"}, $cc_to{"2"} etc... variables which are configured in bizmail.cgi. Quite simply, this means that if the “send to” section of your bizmail.cgi file looks like:

$cc_to{"1"} = "ccto\@yahoo.com"; ## (REMEMBER THE \ BEFORE THE @ SIGN)##
$cc_to{"2"} = "ccto\@hotmail.com";


THEN USING <input name="cc_to" type=hidden value="1">
WOULD SEND DATA TO "ccto@yahoo.com"

IF USING <input name="cc_to" type=hidden value="2">
WOULD SEND DATA TO "ccto@hotmail.com"

ETC...

The number that is chosen will have that same corresponding number in bizmail.cgi, determining where the form submission will be carbon copied for that particular form. This field is only needed or used if you want the form data carbon copied to a second email address. If you don't want form data carbon copied to a second email just leave this field out of the form.

<input type="hidden" name="cc_to" type=hidden value="1">


^ TOP ^



<input type="hidden" name="bcc_to">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" name="cell_to">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" name="sort">

"sort" is another optional field and SHOULD ONLY BE IN THE FORM if you want to sort the field order in the results email you will receive. You can also leave fields out of the form by not including them in this field. If using this option, enter all the form fields you want to be added to the results email starting with the first you want to appear and ending with the last you want to appear and separate each field with a comma.
Example: value="email,firstname,lastname,phone"

NOTE: The date and ipaddress will automatically be added to the top of every form and does not need to be configured in the sort field. SEEN EXAMPLE BELOW.

<input type="hidden" name="sort" value="email,firstname,etc">


^ TOP ^



<input type="hidden" name="custom_message_format">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" name="plain_custom_mesfile">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" name="html_custom_mesfile">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" name="cell_mesfile">

The full readme for this using this field can be found
here.


^ TOP ^



<input name="sendreply">

SET "sendreply" = "1"; IF YOU WANT TO SEND THE FORM POSTER THE AUTO-RESPONSE EMAIL
SET "sendreply" = "0"; IF YOU DON'T WANT TO SEND THE FORM POSTER THE AUTO-RESPONSE EMAIL
IF "sendreply" = "1"; THE name="email" field must be included in your form

<input type="hidden" name="sendreply" value="1">


^ TOP ^



<input type="hidden" name="reply_subject">

"reply_subject" IS THE AUTO RESPONSE MESSAGE SUBJECT LINE. IF YOU SET THE ABOVE VARIABLE "sendreply" TO 0, THE BELOW FIELD IS OF NO CONSEQUENCE TO YOUR FORM

<input type="hidden" name="reply_subject" value="RE: Your recent inquiry.">

For example, if you want the subject to contain the form poster’s first name and you have the form field <input name="firstname" type=text> to gather the person’s first name, then you would personalize the subject line with {firstname}. See example:
<input type="hidden" name="reply_subject" value="RE: {firstname} Your recent inquiry.">

You can read more on personalization TAGS above in the personalization reame section (1A-III).


^ TOP ^



<input name="email">

THE "email" FIELD IS A REQUIRED FIELD IF YOU ARE USING "SENDREPLY".
THIS IS WHERE THE AUTORESPONSE MESSAGE WILL GO

<input type="text" name="email" value="">

name="email" is CASE SENSITIVE. name="EMAIL" will not work!!!


^ TOP ^



<input type="hidden" name="message_format">

"message_format" specifies the format used to send the auto-response email message.

<input type="hidden" name="message_format" value="html">
Sends the auto-response email message in HTML format.

<input type="hidden" name="message_format" value="plain">
Sends the auto-response email message in Plain Text format.

OR YOU CAN LET THE PERSON FILLING OUT THE FORM CHOOSE THE AUTO-RESPONSE EMAIL MESSAGE FORMAT BY USING CODE BELOW:

<select name="message_format">
<option value="plain">Plain Text</option>
<option value="html">HTML</option>
</select>


^ TOP ^



<input type="hidden" name="plain_mesfile">

(OPTIONAL) - "plain_mesfile" specifies the Plain Text auto-response message that will be sent.

For instance if you have the bizmail.cgi config of:

$PLAIN_mes_file{"1"} = "plain.mes";
$PLAIN_mes_file{"2"} = "second_text.mes";
$PLAIN_mes_file{"3"} = "etc.mes";

Then to send the message file of: second_text.mes
Use:
<input type="hidden" name="plain_mesfile" value="2">

YOU CAN LEAVE THIS FIELD OUT OF THE FORM AND IT WILL BY DEFAULT SEND plain.mes


^ TOP ^



<input type="hidden" name="html_mesfile">

(OPTIONAL) - "html_mesfile" specifies the HTML auto-response message that will be sent. For instance if you have the bizmail.cgi config of:

$HTML_mes_file{"1"} = "html.mes";
$HTML_mes_file{"2"} = "second_html.mes";
$HTML_mes_file{"3"} = "etc_html.mes";


Then to send the message file of: second_html.mes
Use:
<input type="hidden" name="html_mesfile" value="2">
YOU CAN LEAVE THIS FIELD OUT OF THE FORM AND IT WILL BY DEFAULT SEND html.mes


^ TOP ^



<input type="hidden" name="file_attachments">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" type="hidden" name="SQL_write" value="1">

The hidden "form field", name="SQL_write" defines whether or not to write data to MYSQL. If set to 1 as seen above, data will be written to MYSQL. If set to 2 this feature will be turned off.


^ TOP ^



<input type="hidden" name="SQL_config">

The full readme for this using this field can be found
here.


^ TOP ^



<input type="hidden" name="sql_primary_key" value="id">

The hidden "form field", name="sql_primary_key" defines the unique "primary key" of the MySQL table to which you are writing the form data. This is only required if you are using the
MYSQL powered success page feature.
In the example above, the MYSQL Unique Primary key that is defined is: id


^ TOP ^



<input type="hidden" name="sql_encrypt_key" value="crypt_id">

The hidden "form field", name="sql_encrypt_key" defines the encryption key that is generated for the
MYSQL powered success page feature, and therefore, is only required if implementing the described success page feature.
In the example above, the MYSQL field that will store the encryption key is defined as: crypt_id


^ TOP ^



<input type="hidden" name="outputfile">

THE “FORM FIELDS” FOUND BELOW ARE NOT NECESSARY, BUT DO ADD MORE VERSATILITY.

"outputfile" is another optional field and only needs to be in the form if you don’t want all fields to be added to the data file. You can specify certain fields. If using this option, enter all the FORM fields you want to be added to the file and separate them with a comma.
Example: value="email,firstname,lastname,phone,date,ipaddress"

NOTE: To add the “date” field, simply enter: date.
To add the “ip address” field, enter: ipaddress.
See the examples below.

<input type="hidden" name="outputfile" value="email,firstname,date,ipaddress,etc">


^ TOP ^



<input type="hidden" name="datafile">

"datafile" is another optional field and only needs to be in the form if you don't want your data to be added to the bizmail.dat file. If you want your data sent to another file, simply enter the file name. For example, to write to the file datafile.dat enter value="datafile.dat" In this scenario you would need to create a blank file named datafile.dat and upload to the same directory as bizmail.dat and CHMOD to 777.

<input type="hidden" name="datafile" value="1">

-OR-

<input type="hidden" name="datafile" value="2">

-OR-

<input type="hidden" name="datafile" value="3">

etc...

THEN SIMPLY ADD OTHER FIELDS THAT YOU WANT THE FORM POSTER TO FILL OUT, AS WELL AS ADD A SUBMIT BUTTON AND YOU ARE ALL SET. YOU CAN ALSO USE THE formV20.html as an example form to use to submit requests.



^ TOP ^



<input type="hidden" name="data_format">

"data_format" is the text separator of the form fields for the data file.
Example: if value="," is entered the data will be sent to the data file as:
email,firstname,lastname,phone,etc - If you want tab delimited format, simply put your cursor between the "" and hit the tab key. This will print data in the format: email firstname lastname phone etc
You can choose whatever character you want.
example of other posiblities | / . ~ etc...

<input type="hidden" name="data_format" value=","> OR
<input type="hidden" name="data_format" value="|"> OR
<input type="hidden" name="data_format" value="~"> OR
<input type="hidden" name="data_format" value=" "> ETC.... (USE ONLY ONE HOWEVER)


^ TOP ^



<input type="hidden" name="text_qualifier">

"text_qualifier" is a data format option. Set to 1 if you want there to be a double quote (") "text qualifier". Example (If you chose the , data_format and set text_qualifier to 1) data would appear as: "email","firstname","lastname","phone","etc" IN THE DATA FILE

<input type="hidden" name="text_qualifier" value="1">


^ TOP ^



<input type="hidden" name="check_duplicate">

"check_duplicate" is another optional field and only needs to be in the form if you are using MySQL to check duplicate form submissions. To activate, enter all MySQL fields you want to check to see if they contain duplicates, each separated by a coma.

For instance, if you are writting form fields "email" and "phone" to MySQL fields "email" and "phone", and you want to check both for duplicates, then you would enter:
<input type="hidden" name="check_duplicate" value="email,phone">

Note: If using this feature, you need to set $MYSQL_delete_dups = "1"; in bizmail.cgi.


^ TOP ^



<input name="field_descriptions">



^ TOP ^