How to Export Checkbox Fields as Separate Columns in GravityExport

By default, checkbox fields export as a single column with all selected values combined. This makes data analysis difficult when you need to filter or sort by individual options.

Default export (all options in one column):

Name Volunteer Interests
Nicole Adoption Events, Transport
John Fundraising, Foster Care
Jane Adoption Events, Fundraising, Transport, Foster Care

Splitting Checkbox Options into Separate Columns

You can export each checkbox option as its own column with two steps:

Step 1: Enable the Multiple Columns Setting

Go to Forms → Settings → GravityExport Lite and enable "Split multi-fields (name, address) into multiple columns".

This setting is required for the code snippet below to work.

Step 2: Add the Code Snippet

The Multiple Columns setting only applies to Name and Address fields by default. To include checkbox fields, add this code to your site (learn where to add code snippets):

/**
 * Split checkbox fields into separate columns during GravityExport.
 * Requires "Split multi-fields into multiple columns" to be enabled.
 */
add_filter( 'gfexcel_transformer_fields', function( $fields ) {
    $fields['checkbox'] = 'GFExcel\\Field\\SeparableField';
    return $fields;
} );

Result

Each checkbox option becomes a column header. When selected, the cell shows the option value; when not selected, the cell is empty.

Name Adoption Events Fundraising Transport Foster Care
Nicole Adoption Events
Transport
John
Fundraising
Foster Care
Jane Adoption Events Fundraising Transport Foster Care
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us