Add a contact form to Wordpress
Posted: July 16, 2006
Please, don’t use a simple mailto link on the web. That’s the single easiest way to increase the amount of spam you receive. Instead, use a contact form. Wordpress has some plugins for email. If these don’t work for you, I’ve included other options available. If you don’t use wordpress, please skip below, there are options available to you covered here.
The simplest way to add a contact form to wordpress is to use one of these plugins:
With servers and senders going through more email verification these days, these two plugins may not work on your server. If these two won’t work, the next option is to install wpPHP Mailer. This takes a little bit more work as it uses a sourceforge php code. Don’t be afraid of working with PHP if you’re unfamiliar with it. This is a fairly straightforward plugin to work with. The main advantage of this one is that it let’s you put in your email password and account, so it will work with many servers which require an additional level of security.
However, if that still doesn’t work for you (some servers again have issues with this particular plugin), the next is to move to the cgi-bin. If you don’t have a cgi bin, write your administrator, most servers come with a cgi-bin and cgiemail installed.
If you happen to have formmail.pl, please read this first before thinking that’s the best way to proceed.
The cgi bin is pretty easy to work with. The main issue most people have using cgiemail is they don’t realize it’s actually two different files they’re working with.
- The first is the actual form. This is a straightforward form which is located on an html or php page (and can be added to a wordpress post or static page so that it’s integrated nicely with your blog).
- The second page is a .txt file that tells the cgi emailer what to do. (Note: The page must be in iso or ascii, cgi doesn’t work properly with all text formats. So, when you save this page, just do a ’save as’ and look through your options - ascii is the best choice).
The last issue is that some servers don’t seem to process the cgiemail form properly unless it’s stored in the root folder (no idea why, this shouldn’t be an issue, but it happens).
Here are the top documents around to show you how to create these forms:
- Official cgiemail page
- An MIT page with additional help
- And yet another good university page from a website creation class
Finally, the last way is to use a wysiwyg editor (such as Frontpage) and publish to your website (the server must have frontpage extensions installed). Since this will not have the ‘feel’ of your blog, you’ll want to create this in a few different steps.
- First, create a new page in Frontpage using the Feedback or Contact Form template.
- Second, customize the form for the fields you wish to include
- Next, publish (since this uses Webbots, you’ll have to publish it, not FTP the page) the page to your server
- Fourth, create a static Wordpress page and use an iFrame to include the contact page in your regular wordpress page
- Complete. You will now have a contact page from Frontpage that utilizes your blog’s template
If this is your first time working with a form, it will take a little bit of time (if you’re creating it from scratch) to make sure all the details are perfect. If you have some experience with HTML, you should be done in 30-60 minutes. If you don’t it might take an hour or two. However, your inbox will be happy with the reduction of spam you receive.
Related Information:- Wordpress Statistic Plugins Comparisons
- Updated to Wordpress 2.1
- New Random Quotes Plugin for WordPress
- StumbleUpon Visitors Not Identified by Analytics
- Wordpress Help Files










