Facile forms/Breezing forms automatically show article title

2009.04.30

breezing-forms

Facile forms (for Joomla! 1.0.x) and Breezing forms (for Joomla! 1.5.x) are – in my opinion – the best extensions for creating forms for your Joomla! website.

I have a quick tip if you want to automatically show the article title in the form.

First of all you must have No Editor selected at the configuration file, because in any other case I saw that WYSIWYG editor mess up my code ;)
You create your form as you do normally and in the Form pieces tab you must load the InitLib at the Before Form section.
Now you must go and add a new Static Text/HTML element in your form. And add to the Text/HTML field the following code:

<?php
$id = ff_getParam(‘ff_contentid’);
if (is_numeric($id))
return ff_selectValue(“select title from #__content where id=$id”);
?>

This will show automatically the article of the title in your form. Now if you want the title article to be sent as a field via e-mail you can add a Hidden Input element and in the value field add the code above and be sure you have select Include in logs to Yes.

Hope to find a useful way to use this implementation to your website.

PS: The community forum of Breezing forms helped me to figure this tip out, but you can use it in Facile forms too.