The Searchable Directory widget enables you to let visitors to your website search one of your databases if you wish. You can set up to two drop-down filters, and corresponding records from your database will be displayed in a list.
For example, you might have a database of records that include fields for Activity and Locality. Visitors to your site could use the Searchable Directory widget drop-down filters to select an Activity and/or a Locality, then click the Search button. The Searchable Directory widget would filter your database and return matching results in a neatly formatted list.
The results list can display system fields from the corresponding records in your database such as Name, Description, Contact, Email, Phone, Website, and Address.
NOTE: The Searchable Directory widget is a premium feature. Please complete this form if you would like this enabled for your website.
Once the widget has been enabled, the first step is to create an online form. By creating an online form, the system will automatically create a database for you that contains all records entered through the form.
The Searchable Directory widget lets you select your online form/database and then set up to two dropdown filters that people will be able to use to see a filtered list of records from your database.
1. Create a form. If you are unsure about how to create an online form, see this article. IMPORTANT: the mandatory First Name and Last Name fields at the top of the form do NOT become visible to the public in the search results (unless you inadvertently change them to the name of one of the system fields listed below). They are normally used for the contact details of the person or organisation that a record relates to. For example, if you were creating a Searchable Directory of local activities, this might be the contact person for an activity. However, the Email address will appear in the results list unless you rename it from 'Email' (for example, you can rename it from 'Email' to 'Email address' to prevent the system from using it in the results list - more information on this is below).
2. Add a new Section to your form, then add one or two question fields that will become the dropdown filters in your Searchable Directory widget. These fields must have their answer type set to SingleChoice so you can list all the available options that people may choose from. For example, you could have a field named 'Activity' where you set the available answers to 'Aquatic Class', 'Circuit Class', etc. You could then configure your Searchable Directory widget to allow people to filter your database on the 'Activity' field, where they can select one of your activities.
3. Add system fields to your form that will appear to the public within the search results list. You can add any number of question fields for your own informational purposes, but there is a set of special system fields that dictate the output visible in the Searchable Directory widget. These system field names must be IDENTICAL to the following:
- Name - (use the SingleLineText answer type) normally used for the name of an organisation or activity. This field is mandatory and will appear at the top of each listing in the search results.
- Contact -(use the SingleLineText answer format) used to name a contact person for the listing. This field is optional and is not needed if the listing relates to a person and the system Name field above is already being used to name a person rather than an organisation.
- Email - (use the Email answer format) used if you want the listing to display an email icon that people can click to send an email (optional).
- Phone - (use the SingleLineText answer format) used if you want the listing to display a contact phone number and show a phone icon that people can click to call the number (optional).
- Website - (use the SingleLineText answer format) used if you want the listing to display an website icon that people can click to open that website URL in a new window (optional).
- Address - (use the Address answer format) used if you want the listing to display an map icon that people can click to open a Google map of the address (optional).
- RSO - (use the Checkbox answer format) used to identify governing bodies or special records. If this box is ticked for a record, then it will display at the top of the list enclosed by a coloured border.
Note: if a record does not have data for any of these fields, the related icon or area in the results list will simply not display. Tick the Required checkbox beside a field if you want it to be mandatory.
4. Save your form.
5. Go to the page on your website where your Searchable Directory widget appears (once enabled by Sporty Support). Use the widget settings cog at the top-right corner of the widget to open its settings area. Select the form/database you created in the steps above, then select the filter fields you wish to display. Finally, set the colour of the widget search button and the icons in the list of search results. Then click Save.
6. The Searchable Directory widget will now appear on your page, letting people see a list of records from your database, filtered by whatever filter options they choose.
ADVANCED: If you want to allow people to add themselves or their organisation or activity to your directory, you can send them a link or publicly display the web input form you created in step 1 above.
However, you may prefer to check/amend any records submitted before they become visible in your public directory. You can achieve this by creating a new copy of your form that is linked to the original form that you created above. Use the copy of your form for your Searchable Directory widget.
This way, when people enter their details through your original form, you can check/amend them and then roll the record forward into the form/database being referenced by the Searchable Directory widget so the record becomes included within the search results.
Important: Field names must be identical between your two forms/databases for data to successfully roll forward to its corresponding field in the new form.