I was looking for something simple that I could use as a replacement for James Huggins Contact Form script, and was directed to ReusableForms and decided to give it a try. I am in no way an expert on using these forms. This is what worked for me.
Your first decision is which of the many forms that are offered do you want to use. I decided I wanted one that supported reCapcha for security reasons, so selected PHP Contact Form With Validation And Recaptcha. You can preview the form to see if it meets your needs and download it.
What is reCAPTCHA key? Google reCaptcha is a popular service providing anti-abuse security to protect your application. The site key is used to render the reCaptcha in a page and the secret key is used for performing server-side validation. The keys are unique to the one domain or more registered domain
The first thing to do if you are going to use reCaptcha key is to request one. They are free.
Step 1: Download the Contact Form you have chosen and unzip the files. I rename the folder "myform." Copy the entire myform folder (not just the contents)to your website folder on YOUR computer.
Step 2: Open the "formpage.html." Working in Code View, add your Site recaptcha
key making sure not to delete the quote marks that enclose the key. Close
and Save your page.
$pp->getReCaptcha()->initSecretKey('Your ReCaptcha Secret Key
Here');
Step 3: Next, open the file named "handler.php" Look for
replace someone@gmail.com with your email address.
s$pp->sendEmailTo(['someone@gmail.com', 'another@gmail.com','more@gmail.com']);If you want to send email to more than one email addresses, just enter it as an array.
$pp->getReCaptcha()->initSecretKey('Your ReCaptcha Secret Key
Here');
Insert you Secret Key
Step 4: Open the "FormHandler.php" (located in the src folder)
$this->mailer->Subject = "Contact Form Submission ";
You can either leave Contact Form Submission as the Subject OR change or add text so you can easily tell which site the form is from if you have more than one site where you are using the form. EXAMPLE: Expression Web Tutorials Contact Form Submission.
$mailer = $pp->getMailer();
$mailer->setFrom('someone@yourwebsite.com','Form',false);
Step 5: Publsih the entire "myform" folder to your webserver. Test your form to see if it works. If it does, you will see a Submitted the form successfully! message. If you receive an error message, take note of what the error is and fix it. Test again.
Step 6: Once you know the form is working, SAVE IT with a different file name so you can identify it later. I use formpage ORIGINAL.html. You can then attach your dwt and check to see if it displays as you expect it to.
Step 7: You will need to copy and paste the following into the head section of your formpage.html then pubish the page to your server.
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css" >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
</script> <link rel="stylesheet" href="form.css" >
<script src="form.js"></script>
EXAMPLE: https://www.family-genealogy-online.com/myform/formpage.html
Expression Web 4.0 Tutorials 2nd Edition from Install to Publish, a FREE EBook by Pat Geary.
Expression Web has a group on Facebook. If you are a FB user, come join us.
Disclosure: This is an affiliate link, which means that if you visit Bluehost.com through this link and purchase this product, I’ll get a commission.
April 2007 - April 2013
Privacy Policy | Migrating from FrontPage to Expression Web
Microsoft® and Expression Web® are registered trademarks of Microsoft® Corporation.
Site Design & Maintenance : Expression Web Tutorials & Templates