Setting up the registration form with cforms II

The cforms II plugin offers many powerful form-building features for the not-so-technical WordPress administrator. As a more technical WordPress developer, it flat out saves you tons of time. The cforms administration interface does take a while to get used to, but it is by far the most powerful and flexible form plugin I've used with WordPress.

CformsII is a complex plugin that requires a large amount of administration real estate, and several screen pages. For this reason, once you activate the plugin, you'll find a whole new panel available on your left-hand side Administration area.

Out of the box, cformsII allows for the use of AJAX, in that it will submit and update the form without reloading the page. It also allows for the very easy creation of all basic types of form elements: input, select, check, and radio boxes as well as textarea boxes. You can wrap form elements in custom fieldset tags with legend text tags for easy grouping of related form elements.

Powerful server-side validation is built right in. It's very easy to assign fields to be required and check for valid e-mail addresses. Beyond that, you can also easily assign your own, custom regular expressions for custom validation. The cforms Help! panel even gives you helpful examples of regular expressions that you can use.

Please see the Help! section far information on how to deploy the various supported fields, set up forms using FIELD5ET5.use default values & regular expressions for single & multi-line fields. Besides the generic success & failure messages below, vou can add custom error messages.

Fieki Name


f required

auto-cleardiaabled read-only


Please Hi I o*jt the foi lowing. * = Required

New F ialdset


The Event: KEvenit}f

Single line of text



Your Name»[|

Single line of text




Single line of text




How Many:#Just mefO|set:trueffl gjest|l#2 gue j i

SeFect Box



What you can bring | If you (an volunteer to bring

Multiple Fines of text





End Fieldeel

Setting up cforms II securely

You'll want to read up on the cforms documentation, and if possible, have a chat with the site's Admin or Hosting provider's tech support. You'll want to take care to go through the Global Settings panel and make sure your installation of cforms II is as secure as possible for your needs of the forms.

If at all possible, try to use Captcha fields to reduce spam and turn off file upload capabilities if you don't need them.

Striking a balance: Forms should be short and easy and yet retrieve useful information

The goal of a form is to strike a balance between gaining as much information from the user as possible without making them feel as though you're asking for too much personal information or, if nothing else, boring them with the tediousness of filling out too many fields.

I've kept this registration form very short and to the point. First, I filled out the form name and set it to Ajax enabled. This will help us out as the page will be loading in a modal box, so when it's refreshed it won't pop out into a new page, outside the modal window.

Registrator Fofm M

Please see the Helpl section for information on how to deploy the various sue single & multi-line fields. Besides the generic success & failure messages belc

Next, using the default form set that's already provided, let's set up a fieldset with legend text and the five form inputs that the event coordinators need to know for planning the events.

First up the event, that is, the name of the event will be passed by the post and not filled out by the user, but I want to show it and it needs to be in a form element to be e-mailed to the administrator.

After the event field, we'll need to ask for the user's name. As no money is being exchanged and this form is more to have a "head count", I've left this to a single field. It's a required field, but I'll allow the user to be as casual or formal as they please.

Next, we'll ask for an e-mail address. This is required and I've opted for server-side validation using the checkboxes to the right. If a user suggests they can bring something to the event, the event coordinator may want to reply to them and get back in touch with them. Also, updates about the events may need to be broadcast to registrants, so a valid e-mail is essential.

Now, let's set up a select box to ask how many guests a registrant may bring to the event.

Last, the message area is a text area that has some text suggesting the registrant offer to bring something and if they can, to state what they can bring in the message area.

OK. So there's our form. In order to view it, it now needs to be placed in a WordPress page or post. We'll be placing it in it's own page, which means we should create that page in WordPress.

Was this article helpful?

0 0
Blogging For Business

Blogging For Business

Download this Guide And Discover How Start And Run Your Very Own Successful Business Blog. Always Wanted To Start Your Own Blog?

Get My Free Ebook

Post a comment