Skip to main content

Make a Dashboard Title Not Show

Last updated 13/07/2022

How to Make a Dashboard Title Not Show

This documentation will explain how to not show the title of a dashboard. By default, Five will display the title of your dashboard in the top app bar, however, you may not always want or need the title to be displayed. By writing a condition in the Show Title If field you can make the title not show. The condition can be as simple as false. If you are using the dashboard in multiple places this will make the title not show wherever your dashboard is located.

Default
true

Steps

  1. Select Dashboards in the menu.

  2. Select the required Dashboard record in the list.

  3. Either click the Edit button in the form app bar, or click directly in the Show Title If field.

  4. Type false in the Show Title If field.

  5. Click the Save button in the form app bar.


Title Shown
Figure 1 - Not show the dashboard title

The image below shows how a dashboard would look in your application with the title shown.


Title Shown
Figure 2 - Title shown

The image below shows how a dashboard would look in your application wth the title not shown.


Title Not Shown
Figure 3 - Title not shown

Add a Conditional Statement to the Show Title If Field

You may be using the same dashboard in several places in your application such as:

  • A standalone dashboard, and
  • This same dashboard is located on a form.

You can write a JavaScript condition that prevents the title of the dashboard from showing when on the form, however, still be shown when a standalone dashboard. The example code demonstrates how to do this.


(five.menuSelection.menuId() !== <'menuID for the dashboard'>)


Prerequisites

  • A form that has a dashboard attached to a page.
  • The dashboard must have a menu item created for the Menu ID to be used in the code.

Menu ID for the Form
Figure 4 - Menu item for the Buys form

Steps

  1. Select Dashboards in the menu.

  2. Select the required Dashboard record in the list.

  3. Either click the Edit button in the form app bar, or click directly in the Show Title If field.

  4. Type your condition. For this example, (five.menuSelection.menuId() !== 'Buys')

  5. Click the Save button in the form app bar.


Add a Condition to the Show Title If Field
Figure 5 - Add a condition to the Show Title If field

The image below shows how the dashboard would look as a standalone dashboard.


Standalone Dashboard
Figure 6 - Standalone dashboard

The image below shows how the dashboard would look on a form page.


Dashboard on a Form
Figure 7 - Dashboard on a form