Filters, Hooks & Snippets
Repeatable Field Groups Support for Contact Form 7
This feature adds support for repeatable field groups when exporting Contact Form 7 submissions to Google Sheets. Instead of combining multiple values into one cell, this feature separates them into individual columns like:
Item 1, Item 2, …, Item 5, making your spreadsheet output clear, structured, and easier to analyze.
How to enable and configure repeatable headers?
Use the wpssc_set_repeatable_field_groups
filter to configure which field groups should be repeated and how many times each group should appear as columns in the spreadsheet.
‘Include the following code in your theme’s functions.php
file or a custom plugin:’
function set_repeatable_field_groups() {
return array(
// Enable or disable support for repeatable field groups
'enable_repeatable_headers' => true,
// Define the base field names that represent repeatable groups
// For example: 'item' will create columns like 'Item 1', 'Item 2', ..., 'Item 5'
'repeatable_headers' => array(
'item',
'country-of-manufacturer',
'declared-value'
),
// Set how many times (columns) each group should repeat
'repeat_count' => 5
);
}
add_filter( 'wpssc_set_repeatable_field_groups', 'set_repeatable_field_groups' );
How to add your own repeatable headers?
To include custom repeatable field groups, simply ensure the field names used in your Contact Form 7 form match the keys listed in the repeatable_headers
array. No additional prefixes or configuration are required — the plugin will automatically handle them during export.