Editing the Contact Form Code

James Huggins passed away early in 2018. The form script was revised in July 2020 so that it now works with php version 7. A big thank you to Tony Rudzki for his work on bringing the script back to life.

IMPORTANT NOTE: This package contains all of James Huggins original documentation and examples as well as the revised script. This form uses version 2.2.6 of the Huggins script (the most current version at the time this form was created. If you have used an earlier version of the contact form and script prior to version 2.2.5 YOU CAN  NOT JUST UPDATE the script, the form itself needs to be updated.

In order for the contact form to work for you, the following lines (highlighted)  must be edited with YOUR information. Editing should be done BEFORE you attach any DWT you choose to use. Be extremely careful in editing the various lines that you do NOT delete (.) periods, (,) commas and (" ") quote marks.

For much more information on just what this form script is capable of, and for the full documentation file see Huggins' Email Form Script.

The styling for the sample form as well as the error page comes from the attached external style sheet form.css. You can leave it attached or you can copy the styles into your already existing style sheet.


Line 14: <form id="contact" action="http://www.your-domain-name.com/huggins-email-form-script-v2.2.6.php" method="post">

Publish the php script to the root of your domain and change the highlighted text to your domain name. Make sure you are using the latest version of James script by checking the version. Make sure the path above points to exactly where the script is located and that the version numbers match. An earlier version of the sample form will NOT work with the latest script version 2.2.6.

The script that you download  has the name huggins-email-form-script-v2.2.6.php.txt. NB: the file is distributed with a .txt suffix. Please rename by removing the final “.txt”.

Line 25: <input name="FormNextURL" type="hidden" value="http://www.your-domain-name.com/thank-you.html" />

Create or edit the included thank-you.html page and change the above highlighted text to your domain name.  If you rename the sample page, make sure you also change the file name above..

Line 44: <input name="FormEchoUser" type="hidden" value="yes" />

Change to no if you do NOT want the user to receive a copy of the generated email.

Line 48: <input name="FormErrorPageHeading1" type="hidden" value="Test Error Form, , , , ,error-page-heading1" />

Change to the Text you want to appear as the H1 heading on your Error Page

Line 52: <input name="FormErrorPageTitle" type="hidden" value="Error Page - Sample Error Page" />

Change to what you want to appear at the top of the browser window for the error page.

Line 64: <input name="Msg1AddrList" type="hidden" value="Pat Geary, patgeary, comcast.net" />

Change to reflect your own email information

Line 72: <input name="Msg1Subject" type="hidden" value="Sample Contact Form" />

Change to what YOU want to see in the Subject of the email you receive.

Line 75: <input name="Msg1TextTop" type="hidden" value="I am testing the sample form to see how it works:" />

Change to what you want to see as the top line of text in the content of the email you receive.

Lines 89-97: These lines are used to indicate what will appear on the email the user of the form receives IF you want it to be different than the one you receive.

IMPORTANT: If you are using an earlier version of the contact form, please note the following lines of code have changed (new code is shown):

<input name="FormErrorPageLinEClosing" type="hidden" value="Please press the BACK button ~ correct the errors and resubmit., , , , ,error-page-line-closing" />

<input name="FormErrorPageLineOpening" type="hidden" value="The form you submitted had the following errors:, , , , ,error-page-line-opening" />

<input name="FormErrorPageFooter" type="hidden" value=",,,,,error-page-footer" />

<input name="FormErrorPageErrorMsg" type="hidden" value=",,,,,error-msg" />

Examples of More Complex Forms:

As you can see from the above examples, there is much more available that you can do with Huggins' Email Form Script

Copyright © Pat Geary of Expression Web Tutorials and Templates
Written March 2011
Updated March 2013
Updated October 2016
Updated July 2020