There are a lot of form builder solutions listed at the Joomla Extensions Directory. However many third party services can be incorporated into Joomla powered sites. Wufoo is a comprehensive online form builder that is a joy to use and the basic account is free. Creating a form with Wufoo is easy, but embedding the code into a Joomla article requires a couple of extra steps. Let's start with a quick overview of how Wufoo works.

The solution presented in this post was tested using Joomla 2.5. However the same principles should apply to later versions as well as Joomla 1.7. Click on images to enlarge.

1. Register for a Gratis account at Wufoo and you'll be able to create 3 forms for free and collect 100 responses per month

2. Once registered and logged in, you can create your first form. Creating form fields couldn't be easier as all you do is click the types you want.

 


3. Click on each field to enter settings such as the title and validation options.

 


4. Finish by giving the form a name and specify what should happen after the form is completed.

 


Once your form is complete, go to the Code page and choose the Embed Form Code option.

 

For greatest browser compatibility, use the JavaScript version. Click in the box and copy the code.

Now edit your article (you could use a module too) and change to HTML mode in the editor. Paste the JavaScript at the point where you want the form to appear. Save the article, go to the frontend and view ... nothing!

What went wrong?

By default, Joomla does not allow you to insert certain tags including JavaScript. This is a security feature to prevent frontend users from entering malicious code. There are two steps required to solve this. First, login to Administrator as a Super User and go to Article Manager. Click the Options button towards the top right.

Select the Text Filters tab and in the Filter Type column, change the Super Users option to No Filtering. The choose Save & Close. This means that if a Super User is logged in, the Joomla core will not filter anything you enter into an article. However the HTML editor has its own filter so this needs to be set too.


If you use TinyMCE as your HTML editor (that's the standard one that comes with Joomla), then go to ExtensionsPlugin ManagerEditorTinyMCE. Remove the word script from the Prohibited Elements box and Save & Close.


Or if you're using the popular HTML Editor JCE, go to JCEProfilesDefaultEditor ParametersOptions – change Allow JavaScript to Yes. Remember to Save.

Now you can go to the article and paste the JavaScript code in HTML mode.

Your Wufoo form will then be displayed within the article. When someone completes your form, the details are stored and displayed at Wufoo. You can also specify that the data is sent to you as an email.



Rant of the week

While preparing this article, I was reminded of the importance of communication. Our Beyond the Basics course includes lessons on how to create forms using a free extensions called RSForm! Unfortunately this is only compatible with Joomla 1.5. The paid version, RSForm! Pro has been upgraded to Joomla 2.5 and our lesson is useful if you choose to go with that option. But we have received a number of forum inquiries asking about the free version and we have been holding out in the hope that RSJoomla will release an update. I looked in their forum and noticed a couple of people had asked if a new version was coming and they received no replies. In fact a huge number of their forum posts have no replies. So I posted a question on their Facebook page, but it too remains unanswered. I'm not writing this to have a dig at RSJoomla. To be fair, they state that their forums are not their support mechanism and when I have sent them tickets in the past, the response has been good. I wanted to use this example to highlight the importance of communication. You see, right now the message I'm getting from them is "we don't care". I'm sure they do care, but that's not what I'm hearing. Why bother having a forum, Facebook Page or Twitter account if you ignore your audience? Are you guilty of this? I know I am at times and I know how hard it is to keep on top of each communication channel. That's why I now have two team members keeping tabs on our Joomla forum. We always try to respond, even if the answer isn't what you want to hear.

I will continue to try and get an answer about RSForm as I think it is the best free one, but if that fails, I will choose a new solution and produce new lessons. In the meantime, you now have an alternative free solution using Wufoo.