Skip to content
GravityKit
Buy
Sign in
0 items

GravityKit All Access

Perform advanced calculations on your form data. Display the number of form submissions, build calculators, and much more.

  • GravityView

    GravityView

    Bestseller

    Display Gravity Forms entries on the front-end of your site and build powerful web applications.

  • GravityImport

    GravityImport

    Trending

    Import entries from CSV files into Gravity Forms to transfer data, create new forms, or update existing entries.

  • GravityEdit

    GravityEdit

    Quickly edit Gravity Forms entries inline to save time, reduce clicks, and streamline your workflow.

  • GravityCharts

    GravityCharts

    Trending

    Turn Gravity Forms entries into interactive charts and graphs.

  • GravityActions

    GravityActions

    Update multiple Gravity Forms entries at once, send bulk emails, and streamline your workflow.

  • GravityCalendar

    GravityCalendar

    Turn Gravity Forms entries into dynamic calendars to showcase events, schedules, appointments, and more.

  • GravityExport

    GravityExport

    Export Gravity Forms entries to Excel, CSV, or PDF and share them instantly with secure download links.

  • GravityMath

    GravityMath

    Perform advanced calculations on Gravity Forms entries to display totals, averages, or build custom calculators.

  • GravityRevisions

    GravityRevisions

    Track, compare, and restore changes made to Gravity Forms forms and entries with a full version history.

  • GravityMigrate

    GravityMigrate

    Migrate all Gravity Forms data, including forms, entries, Views, feeds, uploads, and more.

  • GravityBoard

    GravityBoard

    Manage projects with collaborative project management. Coordinate with your team and streamline your workflows.

Use cases

  • Nonprofits
  • Startups
  • Education
  • Web Agencies
  • Developers
  • Government iconGovernment

Case studies

  • Princeton University
  • BrightLeaf Giving
  • Jacksonville Port Authority
  • National Severe Storms Lab
  • Leadpal
  • Mediebruket
  • Dragonfly
  • HappyTree It
View All Case Studies

  • Blog
  • Case studies
  • Support
  • Live Demos
  • Documentation ↗
  • Developer docs ↗
  • GravityKit Academy ↗
  • GravityKit Live!

Build-it guides

  • Member Directory
  • Company Intranet
  • Fundraising Dashboard
  • Real Estate Directory
  • Document Library
  • Academic Journal
  • Volunteer Management
  • Meal Tracker
  • Simple CRM System
View All Guides
  • Pricing
  • About
  • Plugins

    GravityKit All Access

    Our complete Kit of essential tools for extending and enhancing Gravity Forms—everything you need to build powerful web apps and workflows.

    Learn more
    • GravityView

      GravityView

      Bestseller

      Display Gravity Forms entries on the front-end of your site and build powerful web applications.

    • GravityImport

      GravityImport

      Trending

      Import entries from CSV files into Gravity Forms to transfer data, create new forms, or update existing entries.

    • GravityEdit

      GravityEdit

      Quickly edit Gravity Forms entries inline to save time, reduce clicks, and streamline your workflow.

    • GravityCharts

      GravityCharts

      Trending

      Turn Gravity Forms entries into interactive charts and graphs.

    • GravityActions

      GravityActions

      Update multiple Gravity Forms entries at once, send bulk emails, and streamline your workflow.

    • GravityCalendar

      GravityCalendar

      Turn Gravity Forms entries into dynamic calendars to showcase events, schedules, appointments, and more.

    • GravityExport

      GravityExport

      Export Gravity Forms entries to Excel, CSV, or PDF and share them instantly with secure download links.

    • GravityMath

      GravityMath

      Perform advanced calculations on Gravity Forms entries to display totals, averages, or build custom calculators.

    • GravityRevisions

      GravityRevisions

      Track, compare, and restore changes made to Gravity Forms forms and entries with a full version history.

    • GravityMigrate

      GravityMigrate

      Migrate all Gravity Forms data, including forms, entries, Views, feeds, uploads, and more.

    • GravityBoard

      GravityBoard

      Manage projects with collaborative project management. Coordinate with your team and streamline your workflows.

  • Ideal For

    • Nonprofits
    • Startups
    • Education
    • Web Agencies
    • Developers
    • Government iconGovernment

    Case studies

    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    • Mediebruket
    • Dragonfly
    • HappyTree It
    View All Case Studies

    How to build...

    • Member Directory
    • Company Intranet
    • Fundraising Dashboard
    • Real Estate Directory
    • Document Library
    • Academic Journal
    • Volunteer Management
    • Meal Tracker
    • Simple CRM System
    View All Guides
  • Resources

    • Blog
    • Case studies
    • Support
    • Live Demos
    • Documentation ↗
    • Developer docs ↗
    • GravityKit Academy ↗
    • GravityKit Live!

    Build-it guides

    • Member Directory
    • Company Intranet
    • Fundraising Dashboard
    • Real Estate Directory
    • Document Library
    • Academic Journal
    • Volunteer Management
    • Meal Tracker
    • Simple CRM System
    View All Guides
  • Pricing
  • About
0 items

Search

Results appear automatically as you type.
Loading results…

results found matching

    Sign in
    Buy

    Docs

    • Docs Home

    Gravity Forms Add-Ons

    • GravityView
    • GravityBoard
    • GravityImport
    • GravityEdit
    • GravityExport
    • GravityExport Lite
    • GravityMath
    • GravityCalendar
    • GravityCharts
    • GravityActions
    • GravityRevisions
    • GravityMigrate
    • GF Dynamic Lookup
    • GF Entry Tags
    • GF Event Field
    • GF Widget for Elementor
    • GF Zero Spam

    GravityView

    • Getting Started
    • View Setup
    • FAQ
    • Pre-Sale
    • Advanced
    • Common Problems
    • Customizing Your Views
    • Edit Entry
    • Entry Approval
    • Filter and Sort Results
    • Gravity Forms
    • Merge Tags
    • Roles and Capabilities
    • Search
    • Shortcodes
    • View Settings
    • WordPress Posts

    General Help

    • Account, Invoices, and Billing
    • License Related
    • Plugins and Settings
    • Contact
    • Docs Home
    • Gravity Forms Add-Ons

      • GravityView
      • GravityBoard
      • GravityImport
      • GravityEdit
      • GravityExport
      • GravityExport Lite
      • GravityMath
      • GravityCalendar
      • GravityCharts
      • GravityActions
      • GravityRevisions
      • GravityMigrate
      • GF Dynamic Lookup
      • GF Entry Tags
      • GF Event Field
      • GF Widget for Elementor
      • GF Zero Spam
    • GravityView

      • Getting Started
      • View Setup
      • FAQ
      • Pre-Sale
      • Advanced
      • Common Problems
      • Customizing Your Views
      • Edit Entry
      • Entry Approval
      • Filter and Sort Results
      • Gravity Forms
      • Merge Tags
      • Roles and Capabilities
      • Search
      • Shortcodes
      • View Settings
      • WordPress Posts
    • General Help

      • Account, Invoices, and Billing
      • License Related
      • Plugins and Settings
    • Contact

    GravityCalendar

    • Add a GravityCalendar to Apple Calendar
    • Add a GravityCalendar to Google Calendar
    • Adding custom CSS to your Views
    • Attaching an event into a notification
    • Calendar Blocks
    • Calendar Setting: “No Current Events Behavior”
    • Calendar Shortcodes
    • Calendar: Developer Hooks
    • Can I book an appointment with GravityCalendar?
    • Creating recurring events in Gravity Forms
    • Displaying a calendar
    • Displaying events from another calendar with GravityCalendar
    • Event Field events are showing as all-day in GravityCalendar
    • Getting Started with GravityCalendar
    • GravityCalendar – Customizing event colors
    • How can I change the day weeks start on in Calendar?
    • How to download or subscribe to just one single event
    • How to enable repeating events
    • How to process shortcodes contained within fields used by the Calendar
    • How to remove the all-day text in the calendar list layout
    • I can’t see GravityCalendar settings or create a calendar
    • My calendar or events aren’t displaying
    • Pre-selecting a calendar date using URL parameters
    • The difference between subscribing to a calendar and downloading calendar events
    • Working with timezones in GravityCalendar
    • Home
    • Docs
    • GravityCalendar
    • GravityCalendar – Customizing event colors

    GravityCalendar – Customizing event colors

    Estimated reading: 4 minutes

    Updated on April 27, 2026

    Note: This document is intended for developers familiar with PHP. If you have a question, please ask support.

    In 1.3.1, GravityCalendar added the gravityview/calendar/events filter to modify the events array passed to FullCalendar.

    Using this filter, you can loop through each event and modify its properties. You can add any properties that are available on the FullCalendar Event Object.

    Changing event colors based on their type #

    In the example below, we’ll change the color of the events based on their type. Type is a dropdown field we added to our form:

    Form interface with fields for event details and customizable "Type of Event" dropdown settings

    Example code

    /**
     * Modify event array that is output to FullCalendar
     * In this sample code, we add a background color to a specific event
     *
     * @param array  $events    Array of events.
     * @param object $form      Calendar form.
     * @param object $feed      Calendar feed.
     * @param array  $field_map Array of feed fields mapped to calendar settings (e.g., start_time, end_time).
     * @param array  $entries   Array of entries being displayed in the calendar (Requires 1.5.2)
     *
     * @return array $events Modified events
     */
     
    add_filter( 'gravityview/calendar/events', function ( $events, $form, $feed, $field_map = array(), $entries = array() ) {
    
    	if ( empty( $events ) || empty( $entries ) || $form['id'] !== 9 ) { // Replace 9 with your Form ID
    		return $events;
    	}
    	
    	$event_ids = wp_list_pluck( $events, 'event_id' );
    	
    	foreach ( $entries as $entry ) {		
    		
    		$event_key = array_search( $entry['id'], $event_ids );
    		
    		if ( false === $event_key ) {
    			
    			continue;
    		}
    
    		switch ($entry[5]) { // Replace 5 with the ID of your field
    				
    			case 'event':
                                    $events[ $event_key ]['display'] = 'block'; 
    				$events[ $event_key ]['backgroundColor'] = 'red';
    				$events[ $event_key ]['borderColor']     = 'red';
    				$events[ $event_key ]['textColor']       = 'black';
    				break;
    				
    			case 'appointment':
                                    $events[ $event_key ]['display'] = 'block'; 
    				$events[ $event_key ]['backgroundColor'] = 'blue';
    				$events[ $event_key ]['borderColor']     = 'blue';
    				$events[ $event_key ]['textColor']       = 'white';
    				break;
    				
    			case 'reminder':
                                    $events[ $event_key ]['display'] = 'block'; 
    				$events[ $event_key ]['backgroundColor'] = 'yellow';
    				$events[ $event_key ]['borderColor']     = 'yellow';
    				$events[ $event_key ]['textColor']       = 'black';
    				break;
    			
    			default:
    				$events[ $event_key ]['backgroundColor'] = 'yellow';
    				$events[ $event_key ]['borderColor']     = 'blue';
    				$events[ $event_key ]['textColor']       = 'yellow';
    				break;
    		}
    		
    	}
    	
    	return $events;
    	
    }, 10, 5 );

    Read here how to add these code samples to your website: Where to put code samples.

    The final Calendar with different event colors

    Calendar displaying events with custom colors: red for events, blue for appointments, yellow for reminders
    Still stuck? How can we help?

    How can we help?

    "*" indicates required fields

    This field is for validation purposes and should be left unchanged.
    Replies will go to this email.
    How can we help?*
    My pre-sale question is related to...*
    My WordPress skills are....*
    My Gravity Forms skills are...*
    You will be shown articles from our documentation.
    Vous pouvez nous écrire dans votre langue maternelle si c’est plus facile pour vous—nous nous occuperons de la traduction!
    Puedes escribirnos en tu idioma nativo si te resulta más fácil; ¡nosotros nos encargamos de la traducción!
    Sie können uns in Ihrer Muttersprache schreiben, wenn das für Sie einfacher ist – wir kümmern uns um die Übersetzung!
    U kunt ons in uw moedertaal schrijven als dat gemakkelijker voor u is — wij zorgen voor de vertaling!
    Du kan skrive til oss på ditt morsmål hvis det er enklere for deg — vi tar oss av oversettelsen!
    Du kan skriva till oss på ditt modersmål om det är lättare för dig — vi tar hand om översättningen!
    Você pode nos escrever em seu idioma nativo se for mais fácil para você — nós cuidaremos da tradução!
    Puoi scriverci nella tua lingua madre se ti è più facile — penseremo noi alla traduzione!
    Please provide as much detail as you're able; this helps us provide you with faster support.
    Drop files here or
    Accepted file types: jpg, jpeg, gif, png, tiff, pdf, bmp, zip, json, csv, xls, xlsx, Max. file size: 256 MB.
      Stay informed?

      Was this page helpful?

      GravityKit
      • How to Build It
      • Pricing
      • Products
      • Our Team
      • Our Values
      • Work With Us
      • Coupons
      Support
      • Support
      • Contact
      • Documentation
      • Scope of Support
      • Brand Guidelines
      • Privacy Policy
      • Terms of Service (“Terms”)
      About Us
      • GravityKit on Mastodon
      • GravityKit on Twitter
      • GravityKit Training Courses
      • GravityKit on Facebook
      • Join our Facebook Group
      • Facebook
      • Twitter
      Get notified of updates.

      We’re constantly improving GravityKit. Fill out your email below and we’ll notify you anytime major updates drop.

      GravityKit is a Gravity Forms Certified Developer.

      Copyright © 2026, Katz Web Services, Inc.

      GravityKit and GravityView are registered trademarks of Katz Web Services, Inc.