Secure and Accessible PHP Contact Form on Wordpress
I am making changes to my blog theme and layout recently. I have decided also to set up a Contact Form on my blog. I selected the Secure and Accessible PHP Contact Form v.2.0WP from Green-Beast.com.
I downloaded the plugin, activate it and configure it. The last step was to create a new page and insert the code <!--gb_contact_form--> into the new page. I did that but I just could not get it to work on my wordpress blog.
I consulted Mike and it is just weird that the rich text editor of my Wordpress is having some conflict with the auto parsing code of the contact form. Mike suggested me to create my own template for the contact form.
I did that and amazing, it works now.
So, I just think it might be good to document it down such that it can benefit some other people as well.
1. Create Contact.php Files inside Theme Folder
Start your FTP client, go to the Wordpress Theme folder and select the page.php, duplicate the file and rename the new file as contact.php. Chmod contact.php to 666.

2. Edit Contact.php using Wordpress Theme Editor
Login to Wordpress. open up the “Contact.php” file inside Wordpress Theme editor.

Insert the following code on top of the file.
<?php
/*
Template Name: Contact
*/
?>
Scroll down to look for the <div id=”content”>, replace all the code of the loop to the following code.
<?php// FORM SHOWS NEXTgbcf_show(); ?>
Click update to save the file.
3. Assign the Contact Template to the Contact Page
Create a new page called “Contact” or “Contact Me” using the Wordpress editor. Select the “Contact” template on the right hand side of the editor.

4. Save & Publish the Page
Do a chmod on the contact.php back to 644.
You are Done! You have a contact page on your blog now!



Oct 20th, 2007 at 1:08 pm
This is useful. Thanks for posting it. Two things I’d like to add. First the permissions only need to be set to 666 instead of 777 on the file so that’s what I’d suggest. I’d also recommend changing the permissions back to 644 once the editing is done. Just for increased security.
Oct 21st, 2007 at 2:55 pm
Thanks Mike. I will updated the post.