Terryburg’s Tales of Things You Might Not Know

Things you might not know about using Joomla extension ContentBuilder with Breezing Forms

Things you might not know about using Joomla extension ContentBuilder with Breezing Forms

An inherited client site had a number of forms that relied on a forms package called jxiforms (which I had never used), and those totally choked with a PHP 7 upgrade. Upon further review of the extension it seemed that package had not got any real updates since about 2012, and there was a notice that it had recently gone open-source for anyone to do with as they wished. Not encouraging for PHP 7. So I contacted the owner of that product, “Ready Bytes Software Labs”, and asked if there was a PHP 7 version. They replied nope, and they weren’t doing any further development on the product … but I could do with it what I wished, because it was now open source. I looked over the PHP code and decided nyet – fixing all those functions with the “side effect” repeated parameters would be more work than it’s worth. Plus then I’m updating it forever. So it was on to greener pastures. Though I generally use RSForms Pro for most of my sites I thought it would be overkill for this one, so decided on my sometime fallback, the popular and well reviewed Breezing Forms.

The client site had formerly used the jxiforms package simply to send off an email to the site admin containing whatever the user had filled into the form, and then the site admin had to turn around and type all the email junk into an article for their “classifieds”. They were happy with that workflow, but my impression was what a waste of duplicated effort. WordPress might solve this with a “custom post type” and an associated update form, or maybe we could do something similar in Joomla using a package like K2. But just LUCKILY the same company (crosstec.org) that makes BreezingForms also makes a Joomla extension called ContentBuilder. It will take the saved data from a BreezingForms form (or its own form) and stuff that into a formatted Joomla article, allowing the admin to approve, edit, etc., the submission using exactly the same form as the original user. No messing with a raw Joomla article at all. Tres groovy.

So, after that long-winded introduction, this blog entry is my personal documentation of basic use of ContentBuilder with Breezing Forms to create preformatted articles, that you can then display in a category blog or whatever. I looked but did not find any detailed instructions on the Internet, aside from a pretty helpful but slightly dated ContentBuilder video from Crosstec, so maybe one or two people somewhere else in the world might find the following useful. There are lots of options I did not use for this first project, and your mileage may vary.

This is written based on the following environment:
– Joomla 3.5.1
– Admin template ISIS
– BreezingForms Lite (build 915)
– ContentBuilder 0.9.91

0) Create your BreezingForms forms

1) Install ContentBuilder – https://crosstec.org/en/downloads/contentbuilder-cck-for-joomla.html

2) Components -> ContentBuilder -> Views

3) Hit the green “New” button

4) Make sure you are on the left-most “View” tab
– – Fill in a descriptive view name
– – Make sure your source “Type” is com_breezingforms
– – Save

5) After you have saved, a new line should show up below that allows you to pick your Breezing Forms source. (If it does not, proceed to click around madly.)
– – Choose your source form
– – Also check “edit by type” and “email notifications”
– – Save

6) Now click the blue “Advanced Options” button which will add more options
– – Change “display in” to both
– – Proceed to check a bunch more of the Show options boxes, including select, publish, edit, article, and maybe XLS export
– – Save

7) Now, still on the View tab, you will see all your form fields down at the bottom, with some options checked and some other ones with red circles indicating they are not checked. We want to make sure the items in the “Include in List” and “Editable” columns are all checked.
– – Click the box next to ID to select all the items
– – Hit “Include in List” button at the top – should flip all red O in that column
– – Click the box next to ID again
– – Hit “Editable” button at the top – should flip all red O in that column
– – Save

8) Select the “Permissions” tab. We want to set permissions for Front-End users (form submitters) and Back-End users (admins). In my case anyone is allowed to submit forms on the front end.
– – Choose the “Frontend” link
– – Click the select box at the top of the “New” column to turn this on for all groups.
– – Save
– – Choose the “Backend” link
– – Down on the bottom row, for Super Users (my only admin class for administering submissions), turn on the check boxes for new, edit, delete, publish, and article settings.
– – Save

9) Finally click the “Content Template” tab. Here we will tell ContentBuilder how to format the input from the BreezingForm forms into a Joomla article.
– – Over on the right, select your default category for this article to live in.
– – Drop down “Title Field” to select the form field that will fill your article title. If you were thinking ahead you might have made a unique subject/title field in your form (and required your users to populate it). If you pick a standard field like “name” or something you might end up with a lot of articles all titled Bill.
– – If you want to unpublish this article after some period of time, like if you are entering classifieds or something, put some number of days in “publish down”.
– – Set “Default Access” to whatever you want. For me, that’s Public.
– – Then we come to the actual layout down there in the editor box. A real easy way to create a default article template is to check the “sample” box up top.
– – Save
– – Note 1: The sample layout is real basic and ultra-unattractive – you will want to pretty that right up with your own HTML and styles.
– – Note 2: I have not yet figured out how to tell JCE to leave the ContentBuilder “if-empty” conditionals alone. (You will see them if you have generated a sample template.) JCE (or maybe Joomla) keeps cleaning those up for me. But if you can figure that out, you can make your template ignore empty fields.

10) Click on “Views” at upper left to return to the list of ContentBuilder views, and you will see your shiny new view there, unpublished with a red O. Click that to publish your new view.

11) Profit!

Wow, hey, that’s great! So what happens now?

Well, when some user fills out the BreezingForm, it does its normal thing and stashes the data from the form in the usual place/table, wherever that is. BUT contentbuilder also grabs it and creates a new Joomla article using the template and parameters you defined. (You will probably notice that submitting a form takes a few milliseconds longer, even with speedy PHP 7.)

So what do you, as an admin, do next?

In the backend, under Components, you will notice a new menu item, ContentBuilder Views, with submenu pointers to your new view(s). Click the view for which you just got a submission, and you will see a list of all submissions for that view. If you want to look at it before you publish, or edit it in any way, just use the edit icon. You will see the submitted entry in exactly the same form as the user. Edit and save/submit/whatever. To publish that entry, go back to the list view and just change the unpublished red O to published. Your new article should now show up in your category blog, formatted just like you told ContentBuilder to format it. You never even have to look at this article under Content -> Articles unless you want to. (And I would counsel against changing anything in the raw article.)

So that’s it. That’s how I am using ContentBuilder for this particular site. Basic but it works, and saves my user admins a ton of work they used to do creating articles from email.

Additional footnotes:

A. It might be tempting to think, “hey I have several similar forms, so I will just use the ‘copy’ function of ContentBuilder to create a new view and change that up a little”. But so far I have not found a way to change the form source of a view once it is defined, so a no go on that approach, at least for me. Create each view from scratch.

B) No, I have not yet found a way to disable recaptcha form fields for backend use, either. Kind of a PITA.

C) If you alter your form in any way, like add a field or delete one or maybe change a field name, you are going to need to get into ContentBuilder and change something. Maybe you added a field. You will then need to make sure that field has been enabled for “include in list” and editable, and add it to your Content template. Maybe you changed a field name, or deleted a field. Then you need to alter your Content Template to match. The good news is, when you change the Content Template, ContentBuilder will change the Joomla article to match. You might want to watch out for changing field names, though – not sure what happens if you had a lot of submissions with the old name.

Good luck!