Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.Dismiss Notice
Introduction (top)Lists allow you to display data collected by your forms, or from existing database tables.
Fabrik lists should be considered as views onto the data contained within MySQL tables. This is because with Fabrik lists you can:
- Create joins between database tables.
- Have multiple Fabrik lists pointing at the same database table.
- Each Fabrik list may then apply its own access levels and filtering to alter the display of the underlying database table's data.
Lists (top)To access the lists section select components > fabrik > lists.
You will see a page containing all of your Fabrik lists similar to the diagram below:
Each list can be selected with the check box to the left of its name. Once selected it can be altered by clicking on the buttons at the top of the page:
- New - allows you to create a new list
- Edit - edit the list, note that you can also edit the list by clicking on its name
- Copy - copies the list
- Publish - sets the state of the list to published (note that the list'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 list's state to unpublished
- Import - allows you to import a CSV file to create a new database table and Fabrik list
- Trash- trashes the list (you must select Status=Trashed + then "Empty trash" to delete the list)
- Options - allows you to set up options used through out Fabrik
- Element - Add an element to the list's first group.
- Form edit - takes you directly to the form edit page.
- View data - Shows the data contained within the fabrik list, allowing you to add edit and delete records.
- Published - toggles the list's published state
- View details - shows a list of the list's forms and elements.
Deleting a List (top)To delete a list check the checkbox next to its name in the table list and press the trash button. Then filter the list view on Filter: trashed, to show the lists located in the trash. Finally to delete the list select it and press the delete button. You will then be presented with this page:
The list below the title shows the tables you previously selected for deletion.
Next you have two choices to make:
- Which associated Fabrik sections you wish to delete with the list. To fully remove the table and all its parts select "Delete lists, forms, groups and elements
- Whether you would like to delete (a.k.a drop) the database table that the Fabrik list 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.
Importing a CSV file to create a new list(top)You can create a new Fabrik list 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:
- 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)
- Connection - select the Fabrik connection in which you want to create the database table
- DB table name - enter the name of the database table you wish to create when importing the CSV file. Must be alphanumeric with no spaces.
- List label - enter a label for the Fabrik list.
- Create primary key - if yes selected then an additional primary key element will be added to the imported table.
- Field delimiter - the character used to delimit each column's data
- or Tab delimiter - if checked overrides 'Field delimiter' and sets the delimiter to be a tab
- Text delimiter - The character used to quote strings.
- Press continue to continue with the creation of the Fabrik list from the uploaded CSV file.
- Press cancel to abort this page and return to the list view
Note: CSV import is not going to work if your list has joined data. CSV files by their nature represent a information about a single row of data, it doesn't contain relationship information and thus we would find it very hard to guess the implied relationships in the CSV data when it comes to re-importing it back into a relational database.
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
Important note for Mac users (top)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
- Unicode UTF-8 for character encoding
- ',' as field seperator
- as text separator