WordPress Plugin: JACF – Just Another Contact Form
Screenshots | Preview | Download latest Version (2.0)
Changelog
- 1.0 (07/03/07): initial version
- 1.01 (08/03/07): minor documentation added
- 2.0 (15/07/07): PHP and JavaScript reworked due to some security flaws
Description
As I needed a contact form on my blog page (and for practicing how to develop a WordPress plugin) I came up with the idea to develop a simple plugin form that just displays a nice and easy contact form on my page. I had a look at what has already been done on the WordPress plugin page and found Contact Form ][ by Chip Cuccio.
From my perspective, this served as a perfect starting point for me to learn how to develop a plugin. I started with taking a look at Chip's code, what he did where and why. With this in mind, I started developing my own version, which I called JACF, which is short for "Just Another Contact Form". Nice and easy acronym, at least I hope so.
The following things were important to me:
- Simple form with Name, Email, Website, Subject and Message field.
- Only a few basic options in WordPress admin panel.
- Validation strategy: if JavaScript is enabled, some validation is done on the client side before the form gets submitted. If JavaScript is not available, for some reason, a more sophisticated validation should happen on the server, which means it degrades gracefully.
Functionality
The plugin can be put on any page by using the Quicktag [ CONTACT-FORM ] on any page you like (without the spaces). The plugin then replaces the QuickTag with the form. It displays a form with the following fields:
- Name
- Email Address
- Web Address
- Subject
- Message
- Spam Protection Field
The following fields are required and get checked (client & server):
- Name
- Email Address
- Message
- Spam Protection Field
Installation Instructions
- Download the zip-file and extract the content to wp-content\plugins.
- Login to your WordPress AdminArea and activate the plugin in "Plugins > Plugins"
- Go to "Options > JACF" and click on "Update" to initially activate the basic settings for the plugin
- Edit the page where you want to put the contact form and insert the QuickTag
[ CONTACT-FORM ]at the respective location where you want to insert the form on this particular page. And you're done!
WordPress Admin Options
After activation of the plugin, you can find the following simple configuration options in "Options > JACF" (screenshot).
Email Settings
- Email Address: where should be form data get send to
- Subject Prefix: you can add a prefix at the beginning of the subject to make it easier to indicate a message from your contact form on your WordPress page
Message Settings
- Several Settings concerning success & error messages that get displayed on the page
Tested on
- FireFox 1.5x
- IE6
Credits
As stated above, credits go to Chip Cuccio for providing a great example by developing his Contact Form ][. Thanx Chip!
ToDo
- Internet Explorer: Error Messages get displayed inline, but unstyled for some reason. Could this be a problem due to the lack of CSS support when inserting code on the fly?
Categories
- California (3)
- Cars (1)
- Cologne (3)
- Cycling (7)
- Design (1)
- Events (10)
- Gadgets (1)
- Hockey (1)
- Job (12)
- Life in General (19)
- London (7)
- Mobile (8)
- Music (3)
- Guitar (3)
- NYC (11)
- Programming (6)
- Radio (1)
- Shopping (1)
- Travel (21)
- Uncategorized (1)
- Video (1)
- Web (56)
- Coding (37)
- Agent YUI (6)
- Performance (5)
- Design (2)
- Coding (37)
Blogroll
- Karl Dawson
- Chad Lindstrom
- Ed Eliot
- Jonathan Eckmier
- Mike West
- Andy Clarke
- Molly Holzschlag
- Marco van Hylckama Vlieg
- Brad Touesnard
- Matt Painter
Recent Posts
- Boost the performance of your mobile web app using YUI Compressor
- Cycling through Death Valley, powered by REI
- Bike ride up (and down) a volcano
- Text to speech functionality in web applications using the iSpeech API
- Search along a route with CloudMade’s Local Search API