Trumba
Google 
Trumba Help Center What’s New | FAQ | Support Forum | Email Support

Allow calendar visitors to filter events

What you can learn in this topic

Why you might want to allow filtering

Using the Location, Description, and any custom fields available in your Trumba® calendar events, you can create filters for your published calendar. Filtering makes it easier for your site visitors to find events they care about. When you allow filtering, you give visitors a way to narrow the events list so they see only events that contain fields with specific values.

For example, the Ajenza Martial Arts Studio might want to give site visitors the ability to locate events taught by a specific instructor. Or, the Studio might want visitors to see only beginner-level classes that are open to all age groups. Filters make these options possible.

Process for creating filters

You create filters by configuring filter spuds. To add the filters to your website, you embed the filter spuds into the same web page where you embedded your published calendar.

What are spuds?

Filter spuds, such as this Instructor filter, work in connection with the main calendar spud.

Before you can configure filter spuds, you must set up event types that contain the fields on which you want to filter.

For example, if the Ajenza Martial Arts studio wants to allow its site visitors to filter events by Instructor, the Studio must:

  • Set up an event type that contains an Instructor field.
  • Add a value (instructor name) to that field for each event it creates.

How do I create event types that include fields on which I can filter?

Types of filtering that you can set up

You can set up:

Filters that act independently of one another

When you set up filters that act independently, all of the filters are visible at all times. Site visitors can use one filter at a time to limit events they see in the calendar. Or, they can combine two or three filters to limit the events list even further.

Tip You can configure one filter spud to support up to three independent filters.

For example, suppose the Ajenza Martial Arts Studio created two independent filters, Instructor and Level (Beginner, Advanced, etc.).

A visitors has selected values in each of these two independent filters to see only the events taught by Master Wu for which permission is required.

The table below contains more examples that show how the two independent filters work together.

To see these events Instructor filter selection Level filter selection
Classes Master Wu teaches Master Wu [All Values]
Classes aimed at beginning students [All Values] Beginner
Classes taught by Master Wu aimed at Advanced students Master Wu Advanced
All events in the calendar [All Values] [All Values]

A set of up to three dependent filters

When one filter is dependent upon another:

  • You won't even see the dependent filter until you select a value in the initial filter.
  • Available values in the dependent filter differ depending upon what you select in the previous filter.

In one filter spud, you can configure up to three filters. If the second filter is dependent upon the first filter, then the third filter will be dependent upon the second.

What if I want a combination of dependent and independent filters?

For example, suppose the Ajenza Martial Arts Studio created two filters, Level (Beginner, Advanced, etc.) and Age Range, and made Age Range dependent upon Level.

Before site visitors select values in the Level filter, the Age Range filter isn't even visible.

After site visitors select values in the first filter, the Age Range filter appears, where they can select other values.

The table below contains more examples that show how the two dependent filters work together.

To see these events Level filter selection Age Range filter selection
Beginner classes appropriate for all ages Beginner All Ages
Advanced classes appropriate for all ages Advanced Only Adults appears. There are no advanced events for all ages.
All events in the calendar [All Values] This filter disappears

Combination of dependent and independent filters

You can't mix dependent and independent filters within the same filter spud. Either all of the filters depend upon each other or they are all independent. To set up a combination of dependent and independent filters, therefore, you create multiple filter spuds.

Note You can set up a maximum of three filters, whether you configure all three in the same spud or some in one spud and some in another.

For example, suppose the Ajenza Martial Arts Studio wants to create two dependent filters for Class Type and Level (Beginner, Advanced, etc.), and an independent filter for Instructor. To do this, the Studio would add:

  • One filter spud configured to display the two dependent fields.
  • A second filter spud configured to display the Instructor field.

Site visitors could limit events by choosing values in the dependent filters, the independent filter, or both.

How to set up filtering for a published calendar

To set up filtering for a published calendar, you add and configure filter spuds. Then, you embed the spuds into the page on your website that contains your published calendar.

Note After you make a calendar-level change, such as mixing in a new calendar or adding or removing a filter, it takes approximately five minutes for the changes to appear on your website.

To add and configure filter spuds

  1. In your Trumba account, set up the event types that include the custom fields on which you want your visitors to filter.

    How do I create event types that include fields on which I can filter

  2. Apply the event types to events on the calendar that you intend to publish and add values to the custom fields for each event.
  3. Click Publish above the calendar. On the Publish page, choose the settings you want, and then click OK.
  4. Note If your calendar is already published, you'll go directly to the Publishing Control Panel page.

  5. Click the Control Spuds tab, and then click Add a Control Spud.
  6. On the Add Spud page, click Filter, and then click OK.
  7. On the Edit Settings for Filter page, on the Settings tab, for Event type, choose the event type that contains the custom fields on which you want to filter.

    Tip It's best if the event type you choose is also set as the default event type for the calendar you're publishing.

    How do I set a default event type for a calendar?

  8. For Filter events by, choose a filter from the add new filter list.

    Notes

    • Filter order matters. The first filter will always be visible. You can set the second and third filters to display independently or only after a value in the previous filter is selected.
    • The add new filter list contains only fields included in the event types on the calendar you're publishing. If you don't see a field on which you want to filter, you may need to add the field to the event type you're using.
  9. For Label, type the label that you want your site visitors to see when the filter is embedded into a page on your website.
  10. For Allow, select:
    • Single Value, if you want calendar visitors to filter on only one value for the field at a time.

      For example, you might want visitors to the Ajenza Martial Arts Studio calendar to see classes taught by only one instructor at a time.

    • Multiple Values, if you want calendar visitors to filter on one or more values for the field at a time.

      For example, you might give visitors to the Ajenza Martial Arts Studio calendar the option of seeing classes taught by Master Wu as well as classes taught by Master Ling. Note that a filter can contain up to 20 values. If there are more than 20, it reverts to Single Value.

  11. If you want to add a second or third filter, select another filter from the add new filter list.

    If you want the second or third filter to appear only when a value is selected in the previous filter, select Display filters only after a selection is made in the previous filter.

  12. Click the Styles tab if you want to customize the filter's appearance.
  13. Click Preview to see the filter in action. When you're satisfied with how the filter looks and behaves, click OK.
  14. If you want to add a second filter spud to your website, click Add a Control Spud, and repeat steps 6 to 12.

How do I embed the filters I've created into my website?

How to embed filters into your website

When you publish a calendar, you have the option of adding and configuring filter spuds that you can embed into your website on the same page as the calendar. To embed a spud, you copy and paste the JavaScript code and paste it into the code for the page where you want the spud to appear.

A filter spud, configured to support two independent filters, embedded into the same web page as the calendar.

To embed filters into your website

  1. Set up the filtering options you want for your published calendar as described above.
  2. On the Publishing Control Panel page, click the Control Spuds tab.
  3. Click Add a Control Spud. Select Filter, and then click OK.
  4. On the Edit Settings page, on the Settings tab, configure the filters you want to use.
  5. On the Styles tab, customize the filter's appearance so it matches your website colors and fonts.
  6. Click Preview to preview your filter. When you're satisfied with the results, click OK.
  7. On the Control Spuds tab, in the Filter box, copy the code and paste it into the page on your website where you embedded your published calendar.

I'd like more information about embedding spuds and spud code.

How to remove or turn off filtering

You can reconfigure a filter spud to remove or modify some or all of its filters.

To turn off filtering altogether, you can remove filter spuds from the Control Spuds tab in the Publishing Control Panel. If you turn off filtering, remember to remove the filter spud code from your website.

To reconfigure a filter spud

  1. In your Trumba account, display the calendar with filter settings you want to change.
  2. Click Publish above the calendar.
  3. On the Publishing Control Panel page, click the Control Spuds tab.
  4. In the Filter box for the spud you want to reconfigure, click Edit Settings & Styles.
  5. On the Settings tab:
    • Click Remove to remove a filter you no longer want to use.
    • From the add new filter list, select a new filter you want to add.
    • Select or deselect the Display filters only after selection is made in the previous filter check box to change the dependency settings.
  6. Click OK.

To turn off filtering

  1. In your Trumba account, display the calendar with filter settings you want to change.
  2. Click Publish above the calendar.
  3. On the Publishing Control Panel page, click the Control Spuds tab.
  4. In the Filter box for each filter spud, click Remove.
  5. Delete the filter spud code from the calendar page on your website.
Privacy | Terms | Public Calendars