Tables
From Fabrik
Tables allow you to display data collect by your forms, or from existing database tables.
Fabrik tables should be considered as views onto the data contained within MySQL tables. This is because with Fabrik tables you can:
- Create joins between database tables
- Have multiple Fabrik tables pointing at the same database table.
- Each Fabrik table may then apply its own access levels and filtering to alter the display of the underlying database table's data.
Contents |
List Tables
To access the tables' section select components->fabrik->tables. You will see a page containing a list of your Fabrik tables similar to the diagram below:
Each table can be selected with the check box to the left of its name. Once selected it can be altered by clicking on the buttons in the top right hand corner:
- Published - sets the state of the table to published (note that the table's start and end publish dates still need to be correctly set up for the form to be visible to your users)
- Unpublish - sets the tables' state to unpublished
- Copy - copy's the table
- Delete - deletes the tables
- Edit - edit the form, note that you can also edit the form by clicking on its name
- New - allows you to create a new table
- import - allows you to import a CSV file to create a new database and Fabrik table
- parameters - allows you to set up options used through out Fabrik
For each form in the list you have a couple of links:
- Form edit - takes you directly to the form edit page.
- View data - Shows the data contained within the fabrik table, allowing you to add edit and delete records.
- Published - toggles the table's published state
- View details - shows a list of the table's forms and elements.
<br>The table list can be filtered with the use of the two fields that appear directly above the table headings.<br>
Deleting a Table
To delete a table check the checkbox next to its name in the table list and press the delete button found in to top right hand menu.
You will be presented with a screen as shown above. The list below the title shows the tables you previously selected for deletion.
Next you have two choices to make:
- Which associated Fabrik elements you wish to delete with the table. To fully remove the table and all its parts select Delete tables, forms, groups and elements
- Whether you would like to delete (a.k.a drop) the database table that the Fabrik table was using as its data source. Note that any Joomla table with the Joomla prefix (normally jos_) will never be removed by Fabrik. This is to ensure you don't remove core tables that Joomla relies upon.
Once you are happy with your selections press the delete button.
Parameters
The parameters page can be accessed by pressing the parameters button, located in the table lists top right hand menu. Once clicked a pop-up window will appear as shown in the image below
The top right of the pop-up window contains save and cancel buttons, save will save the options you have selected and cancel will close the pop-up window without making any changes to the parameters
- Use WYSIWYG editor for element labels - The default value is no. If yes selected then when you edit an element, its label field is rendered as a WYSIWYG text editor. This allows you to format your labels with HTML (and is also useful if you want to use the display text element with HTML formatted text)
- Alter filed types - This feature is depreciated, instead alter this option when editing a table
- Remove tables on uninstall - this feature is not yet implemented
- Mootools version - Mootools is the JavaScript library that Joomla and Fabrik use. This option allows you to determine which version of mootools to run.one - select this if your Joomla template already manually includes the mootools scrip
- 1.1 - this is the standard version of mootools that Joomla uses. Use this option for maximum compatibility
- 1.2 - this is the latest mootools release - use this if you want to test out some of the more advanced features of Fabrik (packages and pick list elements are two examples where mootools 1.2 is required)
Note: as of Joomla 1.5.19 we STRONGLY recommend you publish the mootools upgrade system plug-in, which will over ride any setting specified here, loading mootools 1.2.5
- Use mediabox instead of slimbox - this determines which JavaScript library to use for the light box effects that are used by the upload element when in the table view. A light box effect shows a in-page popup window containing the required media. Media box has the advantage of being able to show flash, video etc but requires mootools 1.2 to be selected for the mootools version
- Include lightbox js - determines if the lightbox js code will be loaded in the form and table view.
- Merge JS files - fabrik forms can include several Javascript files (one for each element type you use) Each HTTP request for a file will increase the page load time. Select 'yes' to ask Fabrik to collate all of these files and store them as one file in /components/com_fabrik/js/archive. The next time the form is requested this collated file will be used rather than each of the element files
- Compress merged JS file - In addition you can ask Fabrik to compress these merged files. Compression will reduce the size of the requested file, but may result in javascript errors occurring. JS Min compresses the least but will give you more stable results than Dean Edwards packer (which is pretty much guaranteed to not work and is there for testing purposes)
- Spoof check on form submission - defaults to 'yes' You should always leave this as 'yes' unless you really know why! Turning it off will allow content to be submitted to the Fabrik engine from outside the Joomla site.This is depreciated - you should set this setting when editing each individual form
- Use work in Progress - enables some experimental features, most notably the packages section. Note this really is work in progress and is likely to contain issues. If you find any please report them on the forum and we'll do our best to resolve them for you.
- Allow fabrikDebug - if set to yes then you can append &fabrikdebug to your front end URL's to output debug information about what Fabrik is doing, turn this option off on a live site.
- Use elements as related data - If yes selected user elements will be listed in the table's related data section
- Filter data - Define what data to show in filters when rendered as a dropdown or range. If 'Show table data' selected then only values entered in this element's column will be shown in the filter. If 'Show all' then all possible options will be shown (applies to 'list' type elements such as checkboxes, radiobuttons, database joins).
- Enable single ordering - Can be over-ridden on a per table basis. Single-ordering will reset any other column ordering when ordering a column
Importing a CSV file to create a new table
<br>You can create a new Fabrik table by importing an CSV (comma separated variable) file. To access this screen click on the Import button on the table list page. You will then see a form as shown below:
Connection - select the Fabrik connection in which you want to create the database table
- CSV file - press the browse button to locate the CSV file on your hard drive (excel and open office spreadsheets can be exported as CSV file)
- Create new table - enter the name of the database table you wish to create when importing the CSV file. Must be alphanumeric with no spaces.
- Label - enter a label for the Fabrik table.
- Create primary key - if yes selected then an additional primary key element will be added to the imported table.
- Press import to continue wit the creation of the Fabrik table from the uploaded CSV file.
- Press cancel to abort this page and return to the table list.
If you had selected 'yes' for the 'create primary key' option then the next screen will look like this. Here you can set the element type for each imported column and define the element's label
If you had selected 'no' for the 'created primary key' option then you will see an additional column as shown in the image below:
The Primary key radio list allow you to specify which element is the primary key.
- To continue with the import press the save button, this will create the table, form, group and elements, create the database table and import the CSV data into the table.
- To cancel the import press the cancel button<br>
Important note for Mac users<br>
To avoid pulling your hair out when trying to use this great feature, you have to look for the following issue regarding Excel for Mac (at least in the office 2004 version - newest releases may have corrected the problem): Excel for Mac does not export a CSV usable with the Fabrik import feature because :
- The line breaks are Classic Mac (CF), which is not recognize by Fabrik which will try therefore to create new elements with ALL the records in your file. The line breaks should be set to Unix (LF)
- The fields are not seperated with double quote marks (), which causes Fabrik to not importing anything
Your best solution therefore, if you need to import an Excel file into a Fabrik table, is to open this file into Open Office (latest version 3.3.0 at this moment), then save it to CSV, using save as and CSV text (.csv) as type of file. You will prompted to an exportation preferences window. The default settings should be correct :
- Unicode UTF-8 for character encoding
- , as field seperator
- as text separator
The CSV produced can then be imported correctly into Fabrik, following the procedure above.
View details
You can view the table's details by clicking on the 'view details' link next to each table entry in the table list.<br>Each hyperlink on this page goes to the edit form for the associated table part.
Edit table
Details
- Label - The text that appears at the top of the table
- Introduction - The introduction text that appears below the title and before the table
Filters
Filters are fields or drop downs that enable your users to filter the table's data. Below is an example of a couple of filters:
Note: The template file that is used to render the filter form is located in:
components/com_fabrik/views/form/{tmpl}/default_filter.php
- Filter trigger
- On change - The table filters applied when they are changed
- Submit form - An "apply" button appears at the end of the filters. The table data is only filtered when this button is pressed.
- Show Filters - Hides the filters from the form.
- Advanced search -Adds an advanced search link to the table filter table, as shown in the image below:

Clicking on this link will bring up the advanced filter window. From here your users can select which elements should meet which criteria for filtering the table. Pressing the "apply" button applies the filter to the table, pressing "clear" removes all the current advanced filters.
- Search all - If yes selected then an additional search field will be added to the table view. This field will allow you to search for text across the entire table.
- Advanced search all - Provides mySQL Boolean full text search, allowing you to apply various criteria to your search terms. Please read these links for detailed information regarding how mySQL implements this feature:
http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html
http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html
Below is an example image of this feature in use:
- Search all label - The label assigned to the search all field (in the above example that is 'All')
- Require filtering - If yes selected then the table will show no data until a filter has been selected.
- Filter data - Define what data to show in filters when rendered as a dropdown or range.
- If 'Show table data' selected then only values entered in this element's column will be shown in the filter.
- If 'Show all' then all possible options will be shown (applies to 'list' type elements such as checkboxes, radiobuttons, database joins). If 'default' selected then the global configuration setting will be used (found in tables->parameters->Filter data)
Navigation
- Rows per page - The default number of records to show in the table
- Show add - If set to 'No' then the 'add' button will not be shown in the table, regardless of whether the user has ACL rights to add records.
- Show navigation - Shows or hides the table navigation controls. These controls will only appear when your table has more records that the "Rows per page" value you defined above
- Show All option - Includes an 'all' option in the navigation drop down that is used to select the number of records to show per page. Turn this off if your table contains a large data set as your users may see an out of memory error when trying to view all the table data.
- Show total - show the total number of records in the table. If a filter is applied then this shows the total number of filtered records.
- SEF Slug - When using SEF urls this element's data will be included in the SEF url for each of the table's row's edit/view links.
Layout
- Template - The template to use to render the table. Templates are found in components/com_fabrik/views/table/tmpl
- Admin template - The template used when rendering the Fabrik table in administration pages.
- Detailed view link - Add a detailed view link to each of the table's rows. Clicking on this link shows a uneditable detailed view of the record
- Empty data message - The message to display when the table is empty, this will also be shown if filters return an empty table
- Detail url - If the "Detailed view link" option is activated you can override the link's URL here.
- PDF Icon - Show a PDF button on the page which when clicked will generate a PDF versions of the table
- PDF Template - You can specify an alternative template for the PDF file to use. This is often advisable as the PDF generator has issues with re-creating wide table layouts. If nothing selected here then the table's template setting is used.
Notes
- Note - Add an internal memo for yourself and other administrators describing the purpose of the table. This note will appear as hover text when you roll over the table's title in the table list page
Advanced
- Alter existing field types - If no selected then Fabrik will not attempt to alter the existing structure of the database table's fields when you save elements. If yes selected then Fabrik will update the fields types to best match the settings you choose for each element. Its advisable to leave this as "yes" unless you are confident with managing your database tables' structure from outside of Fabrik
- Process Joomla plug-ins - If set to yes then any {plugin} code found in the table will be processed as if it were in a Joomla article. Note not all plug-ins are compatible with this feature.
- Enable Big Selects - If you have lots of joins and/or large numbers of elements you may hit mySQL's query size limit. If this happens enable this option to remove the query size restriction
- Enable Single Ordering - Fabrik has two ordering models.
- Single ordering - selecting one column to order by will remove the previous ordering
- Mutliple ordering - selecting a column to order by will order by previously selected columns and then by the new column
Work in progress
This section is activated by going to components->fabrik->tables->parameters and activating the "work in progress" option
- Joomfish data translation - if yes selected then when the table is saved a Joomfish XML file will be created in administrator/components/com_joomfish/contentelements/{tablename}.xml
This file will then allow you to translate your fabrik tables' content - Title element - The element to use in Joomfish as the record title. If none selected then the first element will be used.
The Publishing tab
- Published - Is the table published or not, has to be published for users to see the table
- Author - The user who created the table
- Author Alias - An alias to the author
- Created date - The date at which the table was created
- Start Publishing - A start date and time at which to start publishing the table
- Finish Publishing - An end date and time at which to stop publishing the table
RSS
Note Fabrik uses its own feed document type, which is an enhancement of the standard Joomla feed document.
It is located in libraries/joomla/document/fabrikfeed/
With this Fabrik can create special name spaces, such as the GEORSS name space for including geographical locations within the feed. We also allow for correct enclosures meaning that you can create pod-casts from your fabrik tables, that are automatically accessible in iTunes.
- Create RSS feed - If yes selected then Fabrik will create a RSS feed out of the table's data - See the element's RSS feed options section for further information on how to structure the content of the feed items.
- Feed title - The element whose data will be used for the feed item's title
- Feed date - The element whose data will be used for the feed item's date
- RSS Limit - Default number of records returned by the feed. This can be overwritten in the feed url by adding "limit=10"
- RSS Maximum Limit - The maximum number of items that the feed can output. The RSS limit setting must be lower than the value entered here.
CSV
- CSV import - This selects which user groups can access the CSV import option.
- CSV export - This defines which user groups can access the CSV export option
- Heading format - When you export and import CSV files they should always have the same heading format.
For maximum compatibility within Fabrik choose "Element full name".
For increased legibility select "Element label" - Export step - to avoid server time outs when exporting large csv files we perform the export in stages via separate AJAX calls to the server. This value specifies how many records to export with each call to the server
Search
These options refer to how the data in the Fabrik table is referenced by Joomla's main search. You must also install the Fabrik search plug-in for the table's data to appear in Joomla's search results.
- Include in search results - Select 'no' to hide the table's data from the search results.
- Field - The element whose data will be used as the search results title
- Description - The element whose data will be used as the search results descriptive text
Access

The access tab specifies what each user group can or can't do with the data presented in the table.
- View table - The user level at which users can view the table
- View records - The user level at which users can view the uneditable details view
- Edit records - The use level at which users can edit the records
- Or use field -Use this setting if the user doesn't have edit rights based on their group, but you still want them to be able to edit records that 'belong' to themselves. Select the element whose data will contain the user's id. The user will then be able to edit any records where the element's data match the user's id.
- Add records - The access level at which users can add records
- Delete records - The access level at which users can delete records
- Or use field - the same principal as the Edit record's or use field option, except this applies to deleting records.
- Empty records - The access level at which users can empty the table. This removes ALL records from the database and resets the primary key to 0 - Enable this with extreme caution!
Data Tab
When editing an existing table the start of the data tab will look like this:

Note you can now select the additional options:
- Primary key - the element that should be used as the primary key - this element's data should be unique for each record.
- Auto increment - set the primary key element to be an auto-incrementing value. This is the recommended setting
When creating a new table the data tab will appear as below:
The data tab defines the data that the Fabrik table will use.
- Connection - the Fabrik connection to store the table in
- Create new table - If you want to create a new database table enter its name here. Its best to user lowercase letters and "_" in the name.
Note: Fabrik does not automatically replace "#_" with Joomla's database prefix and will strip the "#" from the database name . Trying to create a table called "#_test" will create one called "_test" - Link to table - Alternatively you can link to an existing database table. If this option is selected Fabrik will automatically create the form, group and element's that correspond with the database table's structure. In addition you can also select a MySQL view to use as your Fabrik table's data source, in this case however, you will not be able to add or edit records.
- Order by - The element to use to order the data by (note you can set ordering up for individual elements in their table options tab)
- Oder direction - The default order direction
Group by
Splits the table data up into sub tables. Each sub table is "grouped" by the fact that they contain the same data for the "group by" element.
- Group by - Select the element to group by
- Order by - Select the element to order the group by.
- Template - HTML template that appears before the start of each grouped by table. Use element placeholders (e,g, {tablename___elementname}) To insert data form the first grouped by table's row into the template.
- Order direction - Select the group order direction.
Note you can override the group by column by adding '&group_by=tablename___elementname to your table's querystring
Prefilters
Please see the prefilters page for an indepth discussion on pre-filters
Joins
The joins page has detailed instructions!
Related Data
Find out what related data can do for your tables!
Create a link to you table
To create a Joomla menu link to your table:
- Select "Menu->main menu" from the top administration menu.
- Then press the new button
- Next select "Fabrik->table"
- Give your link a name and on the right hand side of the form select the table you want to link to.
- Press save
You have some additional options you can edit if so desired:
- Reload calculations - By default Fabrik only runs element calculations (sum, average etc) upon form submission. Select 'yes' here if you want those values to be recalculated each time the menu link is clicked on.
- Template - overrides the table's template when viewing the table from this menu link
- Reset filters - reset any applied filters (not prefilters) when clicking on this menu link
- connecting to an existing mysql table
- creating a new mysql database table
- joins
- clearing filters
- creating an RSS feed
- creating a podcast feed
- exporting to CSV
- importing from CSV
- sorting data
- grouping data
- linking to related data
- access rights
- table plug-ins


















