VFORMfm.CGI |
Virtual Form CGI Written by Victor T. DeCristoforo Copyright Area 51 Consulting Inc. |
This example is the same as the first example, with the exception of the CGI
option "VF_Verify" now uses a URL.
This will allow the user response page to be reformatted prior to showing the
user. To accomplish the formatted response page a template will be needed to
merge the results from the form page.
The response template will need to include all the input field names used in
the main form. This allows the CGI to pass along the data that it acquired from
the calling form.
Some of the original HIDDEN fields that were in the first form can be removed
an just added to the response form, as will be show below. With the exception
of the REQUIRED field names.
The response page will have to have one SPECIAL tag name. The tag name is "ACCEPT"
an this must be used with the INPUT statement that uses the type="SUBMIT".
This allows the CGI to identify that there is no more form input an that the
results can now be forwarded along.
<Form action="/cgi-bin/vformfm.cgi" method="POST">
<div align="left">
<table border="0" width="50%">
<tr> <td width="50%">*Name: </td><td width="50%">
<Input type="text" name="NAME"></td></tr>
<tr> <td width="50%">Title: </td><td width="50%">
<Input type="text" name="TITLE"></td></tr>
<tr> <td width="50%">*Company: </td><td width="50%">
<Input type="text" name="COMPANY"></td></tr>
<tr> <td width="50%">Phone: </td><td width="50%">
<Input type="text" name="PHONE"></td></tr>
<tr> <td width="50%">*Email: </td><td width="50%">
<Input type="text" name="EMAIL"></td></tr>
</table>
</div>
<h6>NOTE: Fields with a * are required</h6>
<p>
<Input type="submit" name="Submit" value="Enter">
<Input type="reset" name="RESET" value="Clear">
</p>
<!-- The following input fields are required by the CGI. -->
<Input type="hidden" name="VF_MailTo" value="guru@mail.ar51.net">
<Input type="hidden" name="VF_ReturnURL" value="http://www.drdebug.com">
<!-- The following input fields have special meaning to the CGI. -->
<Input type="hidden" name="VF_REQUIRED"
value="NAME, EMAIL, COMPANY">
<Input type="hidden" name="VF_Verify" value="/vform/VF_ex2_verify.html,
remove_tags ">
</form>
<Input type="hidden" name="VF_Verify" value="/vform/VF_ex2_verify.html,
REMOVE_TAGS">
verse
<Input type="hidden" name="VF_Verify" value="/vform/VF_ex2_verify.html">
The following source only shows the actual FORM HTML code.
<Form action="/cgi-bin/vformfm.cgi" method="post"
name="Vform Example 2">
Let us thank you <input type="text" name="NAME"> for
taking the time to fill out the form. If your employment becomes terminated
at <input type="text" name="COMPANY"> for any reason,
please look us up.
<br>
If we need to contact you for any reason, we will send information to <input
type="text" name="EMAIL">.
<Br>
<Br>
Is this correct? <input type="submit" name="ACCEPT" value="Continue">
<bold><h5>If not please go back an correct.</h5></bold>
<!-- The following fields are used to pass the remaining field data from
the original form to the next process. -->
<p>
<input type="hidden" name="TITLE">
<input type="hidden" name="PHONE">
</p>
<p></p>
<!-- The following input fields are required by the CGI. -->
<Input type="hidden" name="VF_MailTo" value="guru@mail.ar51.net">
<Input type="hidden" name="VF_ReturnURL" value="http://www.drdebug.com">
<!-- The following input fields have special meaning to the CGI. -->
<Input type="hidden" name="VF_Subject" value="VformFM
Example 2 data">
</form>
When using a custom user response page, then usually the email response if
formatted as well. This allows for more control in displaying user response
fields, along with what e-mail data is seen.
<Hr>
Jul 20 12:47:26 [vformfm.cgi]
This form data was sent AUTOMATICALLY by the HTML form:
http://www.drdebug.com/vform/vform20.html#vform_ex1
Using the CGI:/cgi-bin/vformfm.cgi
#START OF DATA
NAME=Victor DeCristoforo
COMPANY=Area 51 Consulting
EMAIL=vicd@ar51.net
TITLE=VP Software Systems
PHONE=330-374-0351
#END OF DATA
<hr>