1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Form Article Plugin Tutorial

Jul 11, 2014
Form Article Plugin Tutorial
  • This tutorial will show you how to make Joomla content items and use a Joomla content item as a template and insert into that template Fabrik elements.
    Also in this tutorial you will learn how to make a calc element that will replace an element value with an image.

    Plugins used
    Article Plugin
    Redirect Plugin

    Validation plugins
    Isnot empty

    First of all you need to make a new list - I called mine Match Reports

    These are the elements that need to be made.

    Match Report List Elements
    Match_Date (date element)
    Title (field element)
    Home_Team (database join element)
    Home_Team_Alt (field element)
    Home_Team_Calc (calc element)
    Away_Team (database join element)
    Away_Team_Alt (field element)
    Away_Team_Calc (calc element)
    Home_Team_Score (field element)
    Away_Team_Score (field element)
    Match_Report_Content (textarea element)
    Category (field element)
    Author (user element) - (hidden element)
    Publish_up (date element) - (hidden element)
    Publish_down (date element) - (hidden element)
    Published (Dropdown element)
    Featured (Dropdown element) - (hidden element)
    Meta_Key (field element) - (hidden element)
    Meta_desc (field element) - (hidden element)
    Tags (field element)

    Teams List Elements

    First of all you need to create two lists, one to hold all the elements for the content and one list to hold the team names.
    The team names list is used as a reference for the team names in the main form. We will use database join elements to insert the team names.
    Calc Elements
    This is an extra element in the list that turns the team names into icons.
    I have a folder called teamicons inside the images folder and all of the images in there are the same .png format and named exactly the same as the team names.
    The Home_Team and Away_Team elements are both database join elements that look at the Teams list.
    The Home_Team_Calc and Away_Team_Calc elements look at the Home_Team and Away_Team elements and return the images.
    Inside the calc elements click on the More tab and enter your calc code there.
    return "<img src='http://yoursite/images/teamicons/{yourtablename___Home_Team}.png' />";

    Article Template
    Once all the elements are made the next job is to make an article template. What I did was make a new joomla content category called Article Templates so that the templates are separate from the content categories.
    I used simple CSS to construct the layout, you can wrap the elements in different style elements such as -

    <div class="row-fluid">
    <div class="row-fluid">
    <div class="row-fluid">

    Setting up the article plugin

    First of all you need to fill in the Options tab and point the Article template dropdown to the joomla article template we created earlier.
    Category - here you can force al lthe articles into a pre selected category or you can add in an element into the list that will hold the category info and then fill out the Or element dropdown.
    Reference element - link this to the Keywords element.
    Delete Mode - here you can set it up so that when you delete the fabrik record it wil lchange the publishing state or trash/delete the joomla article.
    Fields Tab
    Here you want to match up all of the dropdowns to the correct elements in the list.
    In my site I have hidden a lot of these elements from the form but they still need to me filled out - I think the plugin does not work unless all of these dropdowns are matched correctly.
    For instance I do not ever use the published down - Featured - Meta key - Meta Description and have them hidden.
    I also have set the Published element to be a dropdown element that has two values - Published and Unpublished with Unpublished set to default. This way an admin of the site has to read the arictle first then when happy with the content set the element to Published.

    Redirect Plugin
    I made a joomla article with simple HTML in that thanks the user for submitting a match report and the redirect plugin is set to only work on the front end of the site.
    First of all view the article in the front end and grab the URL of it then paste it into the Jump Page box in the redirect plugin.

    Validation plugin
    Finally I added this plugin to make sure that the Content element was not empty.

    So hopefully now you have learnt how to use the form article plugin correctly.
roxiaway likes this.