4 Customize and Test Searchable Lists

One of the most important features of Fabrik is the ability to create searchable lists based on data members enter into our custom Registration and Provider forms. The Fabrik Search tool allows your members to interact with each other and build their own personal relationships with others in the community that share common interests. To explain how the Fabrik Search process works, this chapter is divided into the following four sections.

4.1 Add Demo Members and Menu Items

4.2 Searchable List Settings

4.3 Add a Search Engine and Validation

4.4 Create a Custom Content Type

4.4 Create a Custom Content Type

It can be a lot of work creating a custom registration form or a custom service provider form. If you manage several websites, you may want to export the form to another website. Alternately, you may want to offer it as a free download to other Fabrik users. Alternately, you may want to export your forms to a DEMO website for testing purposes. In this article, we will look at the process for creating, exporting and importing a custom content type.

What is a Fabrik Content Type?
When creating a new List in Fabrik, you give the List a name and a database name. Then click Save. You will then be presented with a screen where you can choose one of the three default Content Types. If you choose one, Fabrik will automatically create not only the list, but groups, forms and elements.

Steps to Create a New Content Type

#1 Select the Form you want to use to create a content type.
Go to Components, Fabrik, Forms. We will choose the Member Registration form.

#2 Create the new Content Type
In the Content Type column, click the tiny Down Arrow.

01

Then click Export. Fabrik will reply, Content Type Created.

#3 Download the Content Type
Then click the Content Type tiny arrow again.

02

This time, click the Download button. Fabrik will download a zipped file.

#4 Use the content type on a new form in your existing website
You may need different member registration forms for different groups on your existing website. If so, create a new list. Give it a Name like Test One and a unique Database name like add_test_one.

4.1 Add Member Menus to Test our new Network

In the last article, we finished creating the Member Registration, Job Provider and Service Provider lists and forms we need to run our new network. All of these forms allow us to add new data just by clicking on the Add button in the back end of our website. In this article, we will first look at the Service Provider Form and List in the back end and then create menu items to look at the same form and list in the front end. We will then use our Member Registration Form to add our Demo Members and have our Demo Service providers fill out the Service Provider form to test how well our new network works.

View our Service Provider Form and List in the Back End
Go to Fabrik Forms, Service Provider and click View Data.

01

We have set the elements for this form so that the only elements shown on the Back End List are Service Provider City, Service Provider Name, Service Provider Category and Provider Photo. Note that we reordered the elements to put the Service Provider City first. We could add new service providers here in the back end if we wanted just by clicking on Add. Note that there is no spam filter on the Provider Info form. The only form we will use a spam filter on is the Member Registration form. Click the back arrow to exit this screen. We will next create menu items to add our Demo Members in the front end.

Create 9 More Front End Menu Items
We need several menu items for our Network to work. We have previously created three Fabrik Forms. These are a Member Registration form, Job Provider form and a Service Provider form.

Each form can be linked to three different front end menu items:

First, we can display the form itself by creating a Fabrik Form Menu Item. Second, we can display a Form Edit page for each member to edit their form using the same Fabrik Form menu item type – but also adding a Row ID and Key Name to the Fabrik Form Options tab. We describe this below. Third, we can display a Fabrik List Table page using the Fabrik List menu item.

Here is a table showing each of these 9 menu items and the menu we will put them on.

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:

4.3 Add a Search Engine and Validation Rules

If you only have 9 Service Providers, you do not really need a custom search engine. But if you will eventually have more than one thousand Service Providers grouped into 9 cities – each with more than 20 categories – then a search engine becomes essential. For example, imagine there are more than 200 Service Providers in Bellingham. If your Member can search for a particular category, this would narrow their list down to only 10 or 20 service providers. The member can then View the Details for these providers and choose 2 or 3 as final candidates to contact directly for more information.

Add a Fabrik Search Engine to your Service Provider List
To add a Fabrik Search Engine to the top of your list, go to the Service Provider Info List Details Screen and click on the Filters Tab:

01

Filters are fields that are used by the search engine to help your members find what they are looking for by filtering the list's data based on the data values. The filter trigger determines when the filter is applied. Leave it set for on change. Leave the location at Above.

Benefits of the Fabrik Advanced Search Option
Fabrik offers at least four kinds of search engines. The two shown on the List Details Filters Tab are called Advanced Search and Search All. The Search All engine works well in the Joomla administrator Control Panel View Data screen. But Search All does not work on our front end List page. This is likely because Search All has a conflict with some setting on our Helix template.

Thankfully, the Fabrik Advanced Search option displays well and works well on the front end of our website. Advanced Search also has a setting in each element in the List View Settings screen Filters tab to precisely define what elements appear in the Advanced Search options. So we will use the Advanced Search option on the front of our website and Search All on the back end of our website.

There are also several other types of search options mentioned in Fabrik Tutorials and on the Fabrik forum. These include using a Fabrik Search plugin to access the Joomla standard search function or the Joomla Smart Search function. Neither of these worked with my template and the current version of Fabrik. This may change in the future. Finally, there is also an option called Related Data. We will look at this option later. But for now, we will just stick with the Fabrik Advanced Search option. To turn on Advanced Search, change the setting to Yes. Then click Save and Close. Then view the Advanced Search tool as a logged in Member.