New in GravityView Pro: Live Filters, Connected Views, and more

A new reveal every day this week, available Thursday, November 12

See What’s New

Skip to content
GravityKit
Buy
Sign in
0 items
  • 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 frontend 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, PDF, or Google Sheets, then share them with secure links or deliver them to cloud storage on a schedule.

    • 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 between sites, including forms, entries, settings, Views, feeds, and file uploads, and import forms from other form plugins.

    • GravityBoard

      GravityBoard

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

    • GravitySearch

      GravitySearch

      Search Gravity Forms entries across every form from one screen.

  • Ideal For

    • Nonprofits
    • Web Agencies
    • Education
    • Developers
    • Small Businesses
    • Startups
    Explore All Use Cases

    Case studies

    • Be There Local
    • Killer Shorts
    • West Fork Schools
    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    View All Case Studies
  • Resources

    • Blog
    • Case studies
    • Newsletter
    • GravityKit vs competitors
    • Live Demos
    • Documentation
    • Developer docs
    • GravityKit Academy

    Ultimate guides

    • How to use Gravity Forms
    • Editing Gravity Forms entries
    • Importing Gravity Forms entries
    • Exporting Gravity Forms entries
    • Displaying Gravity Forms entries
    • Gravity Forms conditional logic
    • Gravity Forms calculations
    View More Articles
  • Support
  • Pricing
  • Plugins

    • GravityView

      GravityView

      Bestseller

      Display Gravity Forms entries on the frontend 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, PDF, or Google Sheets, then share them with secure links or deliver them to cloud storage on a schedule.

    • 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 between sites, including forms, entries, settings, Views, feeds, and file uploads, and import forms from other form plugins.

    • GravityBoard

      GravityBoard

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

    • GravitySearch

      GravitySearch

      Search Gravity Forms entries across every form from one screen.

    View All Products

    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
  • Ideal For

    • Nonprofits
    • Web Agencies
    • Education
    • Developers
    • Small Businesses
    • Startups
    Explore All Use Cases

    Case studies

    • Be There Local
    • Killer Shorts
    • West Fork Schools
    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    View All Case Studies

    How to build...

    • Client Portal
    • AI-Built Directory
    • Conference Website
    • WordPress CRM
    • Admin Dashboard
    • Inventory Management
    • Vendor Portal
    • Document Library
    View All Guides
  • Resources

    • Blog
    • Case studies
    • Newsletter
    • GravityKit vs competitors
    • Live Demos
    • Documentation
    • Developer docs
    • GravityKit Academy

    ultimate guides

    • How to use Gravity Forms
    • Editing Gravity Forms entries
    • Importing Gravity Forms entries
    • Exporting Gravity Forms entries
    • Displaying Gravity Forms entries
    • Gravity Forms conditional logic
    • Gravity Forms calculations
    View More Articles
  • Support
  • Pricing
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
    • GravityActions
    • GravityBoard
    • GravityCalendar
    • GravityCharts
    • GravityEdit
    • GravityExport
    • GravityImport
    • GravityMath
    • GravityRevisions
    • GravitySearch
    • GF Widget for Elementor
    • GF Dynamic Lookup
    • GF Entry Tags
    • GF Event Field
    • GravityExport Lite
    • GF Zero Spam
    • GravityMigrate

    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
    • Agency accounts
    • Contact
    • Docs Home
    • Gravity Forms Add-Ons

      • GravityView
      • GravityActions
      • GravityBoard
      • GravityCalendar
      • GravityCharts
      • GravityEdit
      • GravityExport
      • GravityImport
      • GravityMath
      • GravityRevisions
      • GravitySearch
      • GF Widget for Elementor
      • GF Dynamic Lookup
      • GF Entry Tags
      • GF Event Field
      • GravityExport Lite
      • GF Zero Spam
      • GravityMigrate
    • 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
      • Agency accounts
    • Contact

    GravityExport

    • Checkbox values are missing from exports after a choice is deleted
    • Connecting Box to GravityExport
    • Error: “Allowed memory size exhausted” when exporting entries
    • Export Gravity Forms entries to Google Sheets
    • Adding a download button for entries in GravityView using GravityExport
    • Attaching all entries to an email in GravityExport
    • Attaching an entry export to a notification using GravityExport Lite
    • Changing labels in GravityExport
    • Changing the File Format of a Report by Adding the File Extension to the URL
    • Changing values in GravityExport
    • Connecting Dropbox to GravityExport
    • Connecting FTP to GravityExport
    • Customize Download URLs in GravityExport
    • Exporting a single entry with GravityExport
    • Filtering entries included in a GravityExport download
    • Filtering exports by date in GravityExport
    • Formatting an address in GravityExport
    • Getting started with GravityExport
    • GravityExport and caching plugins
    • GravityExport Developer Hooks
    • GravityExport FAQ
    • GravityExport field: BaseField
    • GravityExport field: DateField
    • GravityExport field: FileUploadField
    • GravityExport field: ListField
    • GravityExport field: MetaField
    • GravityExport field: NotesField
    • GravityExport field: NumberField
    • GravityExport field: ProductField
    • GravityExport field: RepeaterField
    • GravityExport field: SectionField
    • GravityExport field: SeparableField
    • GravityExport Filters
    • GravityExport: How to output dropdown field labels Instead of values
    • GravityExport: Splitting complex fields in Multiple Columns
    • GravityExport: The “Enable multi-row splitting” setting
    • How Is GravityExport Lite Different From GravityExport?
    • How to configure GravityExport to save File Upload fields
    • How to export all forms in bulk to an Excel spreadsheet
    • How to Export Checkbox Fields as Separate Columns in GravityExport
    • How to re-run a GravityExport Save feed
    • How to schedule automated exports
    • How to trigger a GravityExport Save Feed
    • How to use FastCron to trigger exports on a custom schedule
    • PDF export settings and style controls
    • Restricting file access in GravityExport & GravityExport Lite
    • Styling PDF file exports using CSS
    • Home
    • Docs
    • GravityExport
    • Checkbox values are missing from exports after a choice is deleted

    Checkbox values are missing from exports after a choice is deleted

    Estimated reading: 6 minutes

    Updated on October 28, 2026

    GravityExport and GravityExport Lite read a Checkboxes field by the numbers of its current choices. When a choice is deleted after entries were submitted, some of the saved values no longer appear in exports. The entries themselves are unchanged, and the values are still in the database.

    Which values go missing

    Gravity Forms numbers each checkbox choice by its position. In a Sessions field with ID 5, Morning kata is 5.1, Afternoon randori is 5.2 and Evening coaching clinic is 5.3, and each entry saves its ticked choices under those numbers. Deleting a choice moves every choice below it up one number, so the field now has one number fewer. The values saved under the last number are left out of exports:

    • If you delete the last choice, its own values go missing.
    • If you delete another choice, its values still appear in exports, and the values of the last choice go missing instead. After Afternoon randori is deleted from the example, an entry that ticked Afternoon randori and Evening coaching clinic exports only Afternoon randori.

    Adding a choice at the end of the list doesn’t change any numbers. Gravity Forms’ own entry export lists the field’s current numbers too, so it leaves out the same values.

    Restore the values by adding the choice back

    Add the deleted choice back in its old position, and the values return to the export as they were submitted. For a one-time export, add the choice back, run the export, and delete the choice again.

    1. Edit the form and click the Checkboxes field.
    2. In the field settings, click Edit Choices.
    3. Click the + button next to the choice that came before the deleted one, and enter the deleted choice’s label.
    4. Click Save Form.
    The Choices panel of a Checkboxes field with Morning kata and Evening coaching clinic, and the + button next to Morning kata outlined in red

    Export every saved value with a code snippet

    The snippet below replaces the checkbox export handler of GravityExport and GravityExport Lite with one that also reads values saved under numbers the field no longer has. It exports each entry’s values in the order of their numbers. For fields with no deleted choices, the export doesn’t change.

    /**
     * GravityExport / GravityExport Lite: export every checkbox value saved in an
     * entry, including values saved under choices that were later deleted.
     *
     * Exports read a checkbox field by the input numbers of its current choices
     * (5.1, 5.2, ...), so values saved under a number the field no longer has
     * are skipped. This registers a replacement export handler that also reads
     * those values.
     *
     * GravityExport creates the handler for each field from a class name, so the
     * handler has to be a class. GravityExport Lite loads its classes while
     * plugins load, so the class is defined on after_setup_theme, which also
     * runs when this code is in a theme's functions.php file.
     */
    add_action( 'after_setup_theme', function () {
        // Bail if GravityExport Lite is not active, or the snippet was already loaded.
        if ( ! class_exists( 'GFExcel\Field\CheckboxField' ) || class_exists( 'GK_CheckboxAllMetaField' ) ) {
            return;
        }
    
        class GK_CheckboxAllMetaField extends \GFExcel\Field\CheckboxField {
            public function getRows( ?array $entry = null ): iterable {
                $inputs = $this->field->get_entry_inputs();
    
                // Fields without per-choice inputs keep the default behavior.
                if ( ! is_array( $inputs ) ) {
                    yield from parent::getRows( $entry );
                    return;
                }
    
                // Start from the keys of the field's current choices.
                $keys = array_map( static function ( $input ) {
                    return (string) $input['id'];
                }, $inputs );
    
                // Add every stored key for this field, including removed choices.
                // Example: the entry still holds 17.3 while the field now stops at 17.2.
                foreach ( array_keys( (array) $entry ) as $key ) {
                    if ( preg_match( '/^' . preg_quote( (string) $this->field->id, '/' ) . '\.\d+$/', (string) $key ) ) {
                        $keys[] = (string) $key;
                    }
                }
    
                // Keep the exported values in choice order.
                $keys = array_unique( $keys );
                usort( $keys, static function ( $a, $b ) {
                    return (int) substr( $a, strpos( $a, '.' ) + 1 ) <=> (int) substr( $b, strpos( $b, '.' ) + 1 );
                } );
    
                // Read each stored value the same way the default handler does.
                $has_values = false;
                foreach ( $keys as $index ) {
                    if ( ! rgempty( $index, $entry ) ) {
                        $has_values = true;
                        $value      = $this->filter_value( $this->getFieldValue( $entry, $index ), $entry );
                        yield $this->wrap( [ $value ] );
                    }
                }
    
                // Preserve the default placeholder behavior for entries with no values.
                if ( ! $has_values ) {
                    $empty_value = gf_apply_filters(
                        [ 'gfexcel_field_checkbox_empty', $this->field->formId, $this->field->id ],
                        '',
                        $entry,
                        $this->field
                    );
    
                    if ( '' !== $empty_value ) {
                        yield $this->wrap( [ $empty_value ] );
                    }
                }
            }
        }
    
        // Tell GravityExport to use the handler above for checkbox fields.
        add_filter( 'gfexcel_transformer_fields', function ( array $fields ): array {
            $fields['checkbox'] = 'GK_CheckboxAllMetaField';
            return $fields;
        } );
    } );

    Note: To add this code to your site, see Adding custom PHP code snippets to your website.

    To stop people from picking a choice without deleting it, hide it on the form instead. Changing or deleting choices in a form that already has entries shows how.

    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.
      Get better at Gravity Forms every Friday

      Was this page helpful?

      Table Of Contents
      • Which values go missing
      • Restore the values by adding the choice back
      • Export every saved value with a code snippet
      GravityKit
      • How to Build It
      • GravityKit vs competitors
      • Pricing
      • Products
      • Our Team
      • Our Values
      • Work With Us
      • Partner Directory
      • Coupons
      Support
      • Support
      • Contact
      • Documentation
      • Scope of Support
      • Brand Guidelines
      • Brand Kit
      • Privacy Policy
      • Terms of Service (“Terms”)
      I am a...
      • Nonprofit
      • Web agency
      • Small business owner
      • Web developer
      • Educational institution
      • WordPress freelancer
      • Startup founder
      • One-person agency
      Get notified of updates.

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

      See past editions
      • Facebook
      • Twitter
      • Mastodon
      GravityKit is a Gravity Forms Certified Developer.

      Copyright © 2026, Katz Web Services, Inc.

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