4.2 Fabrik Searchable List Settings

In the previous chapter, we reviewed how to create a custom Registration form. We then created custom groups – each with their own Intros and Outros. We then added a series of elements to our custom Registration form – being careful to assign each element to one of our custom groups. Finally, we created 17 Demo Members which we added to create a series of records. These records can now be displayed in a searchable table that Fabrik calls a list. In this chapter, we will review how to customize our Fabrik List and Search functions.

Four Key Fabrik Functions
Fabrik has several different parts which all work together to help us build a custom community network. These include:

Forms - which contain groups of elements and are used to collect records from our members.

Groups - which are sections of our form used to help divide and organize our form into collections of elements.

Elements - which are the individual fields present on a form and the column names in your database table with each column holding the records entered using each element.

Lists - which take records collected from your form elements and display them in a searchable table.

Fabrik Settings, Parameters and Permissions
Each form, group, element and list have their own settings and parameters and viewing, editing and deleting rights. Menu items that link to these lists and forms also have their own access and display settings. Finally, if linking to a form in a module, the module also has its own access and display settings and permissions. Quite often, most of these settings and permissions can be left at their default values. Our goal is to cover just a few of these settings. Because this is a project based course, we cover these Fabrik settings and parameters in the order that they are needed to create our custom Registration form and Searchable List.

View the Fabrik Service Provider List
After setting up and entering data in our Service Provider Signup form, Fabrik will create a matching Service Provider List to display the data entered into the Service Provider Signup form. Let’s begin by look at our Service Provider List in the front end of our website. To view this list, we need to create a Fabrik List menu item in our Members menu and set it for Registered Member access. We did this in an earlier article. Then go to the front end of our website and log in as a Registered Member. Then click on the Provider List Menu Item. Alternately, in the back end, we can click on Fabrik Lists and then click on View Data for the Provider Info List. Here is what our List of 9 Service Providers currently looks like:

01

A huge list like this can be overwhelming to members trying to read it. We will therefore use the Fabrik List, Service Provider Info Edit screen to first group Service Providers by City and then allow Members to search and filter the list for specific Service Provider categories. Members can then click on a link to view each Service Providers Profile page.

Go to Fabrik Lists to see our lists in the back end of our website:

02

Click on View Data for the Service Provider Info list and you will see the same data table that we is in our custom Registration form View Data screen and the same data table that is displayed on the front end of our website.

A Tour of the Service Provider List Edit Options
Click on the Service Provider Info List . This brings up the Service Provider Info List Edit screen:

03

This List Edit screen is where we can edit the content and appearance of our list (which you can also think of as a table). The Edit List screen opens in the Details screen. The Details screen is divided into 7 tabs. The first tab is called Text. The remaining tabs are called Filters, Navigation, Layout, Links, Noted and Advanced. We will cover some of these functions later if and when they are needed. Next click on Data in the left side menu to view this Data screen:

04

The Data screen is divided into 5 tabs called Data, Group by, Prefilter, Joins and Related Data. Click on the Group by tab. Then change the Group by Setting from blank to Service Provider City.

05

Then scroll down the screen and change Start Collapsed from No to Yes. Then click Save and Close. Then click View Data:

06

Our members can now quickly see that we have 3 Providers in each of three cities. Click on Bellingham to see the 3 providers and their categories in this city:

07

Now go back to the Fabrik Lists Service Provider List Edit screen to continue our tour of the List Edit screen functions. Next click on the Publishing screen:

08

The Publishing screen is divided into 6 tabs. These are called Publishing, RSS, CSV, Open archive initiative, Joomla Search and Quick Icons. We will cover some of these functions later if and when they are needed. Next click on the Access screen:

09

This screen is similar to the Joomla Access screens in that it defines who can see and do different things on our table. Sadly, by default, the public is allowed to Edit Records and Add records and Delete Records! Open the list in a new browser and log in as a personal member and you will see this is true:

10

So our first step is to change the access to View List and View Records to Registered. Change Edit Records to Member Coordinator or Userid (Userid will allow each member to edit their own records). Change add Records to Special. This will allow folks to add their own Service or Job Provider records once they have been assigned to the Service Provider or Job Provider group. Change Delete Records to Member Coordinator and Empty Records to Super User:

11

Then click Save. Then go to the front end to log in as Provider 01 to view the page again.

12

Job and Service Providers can now edit their own Info records But they can not edit or delete the records of other Providers.

Restrict who should be allowed to Delete All Records

Empty records setting -The access level at which users can empty all records in the entire table. This removes ALL records from the database and resets the primary key to 0! By default, Empty Records is set to Special -which in our case includes Authors, Service Providers and a lot of other members. Use the drop down to change this to Super Users. Then click Save.

Hide the Front End List Add Button and Group by button
There is an Add button and a Group by button above each of our Provider Lists on the front end. We will use CSS to hide both buttons on the front end. In the Joomla Control Panel menu, click Extensions, Templates, Styles. Then click on the Helix template to Edit it. Click Template Options. Then Custom Code. Then in the Custom CSS box, copy paste:

a.addbutton.addRecord {display: none;}

.dropdown-toggle ,groupBy {display: none}

Then click Save and Close.

Hide the CSV button
Just above either Provider List is a CSV button. To turn this off so that it is only seen by Member Coordinators on the front end, click Job Provider List, Publishing screen, CSV tab and change CSV import and export to Member Coordinator. Then click Save and Close. Change the same setting on the Service Provider List, the Housing Provider List and the Housing Seeker List.

13

How to export a List and import a List
We have added more than 60 options to our Service Provider List. We need an identical list for our Job Provider categories. We could add these 60 options all over again. But a better solution is to Export the Service Provider category list and then import it to a new blank list called Job Categories. This can also be used to move a list to a new site. Go to Service Categories List, View Data. Then click CSV Export.

14

Click Download Here.

15

Click OK to download the file. Then find the file in your Downloads folder and move it to the folder of the other website. Then log into other website control panel. Go to Fabrik Lists. Create a new list called Job Categories (Or Service Categories). Click on the Data tab. For database tablename use ace_job_categories or ace_service_categories. Then click Save. Then click Save and Close. This will create an empty table. Import works best with an empty table. In the empty table, click View Data. Then click on CSV import to import the CSV file. This screen will appear.

16

Click Browse to find and load the CVS file. Wait for Red to change to white indicating that the file is loaded. Change Overwrite to Yes. Then click Continue.

17

Change service_provider_category from No to Yes so that it will create the element to hold the data. Leave the element type set for Field. Then click Continue. This will return us to the Table of Lists. For Service Categories, click View Data. The data was successfully imported. To replace the old element in our Service Provider Info form, first unpublish and delete the old element. Then create new database join and unpublish the old database join.

How to add data to a list and sort alphabetically
Our Service Provider and Job Provider Category Lists each have over 60 options. It is likely that over time, there will be dozens of additional categories added to these Lists. The reason we made these List separate from our Service Provider and Job Provider Info List and form is so that we can easily add more options to these lists. Sadly, by default, Fabrik does not sort any new list entries alphabetically. We therefore need to change a list setting to make this happen. Click on Fabrik Lists and click on the Service Provider Categories List to edit it. Click on the Data screen which opens in the Data tab. Change Order by to Service Provider Category and leave the order set for Ascending. Then click Save and Close. Repeat for Job Categories.

18

What’s Next?
This completes our introduction to Fabrik Lists. In our next article, we will review how to add a Search Function to the top of our list to help members quickly find Service Providers in the category they are interested in. We will also cover Fabrik Validation Rules needed to make some elements required.