Display Results with GravityView

0

To display results on your website, we’ll create a View similar to the one in the last lesson.

Start by creating a New View, name it 5k Results, and choose the Data Tables View type.

Clear the Above Entries Widget fields and continue to the Entries Fields section. Here select the fields that you want to display for the results. For a pretty standard results display, I’ve added the following fields:

  • Name
  • Gender
  • Age
  • Time 

Age is entered as a Custom Content fields using gv_math just like in the last lesson. 

To identify the place ranking for each runner, let’s add another Custom Content field and drag it to the top. 

Drag Custom Content field to the top of the fields

In the Custom Content field, enter {sequence} and add a custom label of Place.

Custom Content Settings with {sequence} entered in content box

This will number the entries with 1 for the first entry, 2 for the second and so on. We will sort the entries by time so that the first entry is the first place runner. We can also filter the entries to show the results by category.

Clear the Below Entries Widgets, then continue on to the View Settings.

Ensure that “Show only approved entries” is checked. You can choose whether to also check “Show all entries to administrators.”

Next click on the Filter & Sort tab. Sort by the Time field in Ascending order. It should look like this:

Filter & Sort Settings showing Time and Last name sorting in ascending order

Finally, you can use the Advanced Filter to show results in groups. For example, to show results for 30-40 year old females, you would set the following parameters:

Gender is Female

AND

Age on Date of Race is 30 OR Age on Date of Race greater than 30

AND

Age on Date of Race less than 40

Advanced Filter Settings showing selections described above

You can easily duplicate your View and change the Advanced Filter parameters to create a View for each group in your race. See our course Using Advanced Filters to Easily Display Subsets of Your View for details on how to do this.

Once you’ve finished setting up your Views, grab the Embed Shortcode and embed it on your results page. You can insert multiple GravityView shortcodes on one page to display all of your groups on the same page.

Embed Shortcode highlighted in Publish box

The final result looks like this (without sorting by gender or age):

5 columns showing sample results for 5 runners: Place, Name, Gender, Age, Time; 1, Jeremiah Gill, Male, 41, 20:41; 2, Mason Dalton, Male, 40, 25:13; 3, Cora Armstrong, Female, 35, 25:43; 4, Joseph Gonzalez, Male, 31, 27:29; 5, Kara Arnold, Female, 30, 30:31