Description

The wpforms_pro_admin_entries_export_allow_multiple_input_field filter allows users to disable the splitting of multiple input field values into separate columns in the exported file. It is enabled by default.

Parameters

$allow
(bool) (Required) If false, all notification emails will be disabled (default is true).
$field
(array) The field.

Source

wpforms/src/Pro/Admin/Entries/Export/Traits/Export.php

More Information

Certain fields can generate an excessive number of columns. For instance, a select field containing a list of countries will result in a separate column for each country when exported. The wpforms_pro_admin_entries_export_allow_multiple_input_field filter enables you to modify this behavior.

Examples

All fields

/**
 * Filter to allow multiple input for specific fields.
 *
 * @link  https://wpforms.com/developers/wpforms_pro_admin_entries_export_allow_multiple_input_field/
 *
 * @param  bool    $allow      Default is true. 
 * @param  array   $field      The field.
 *
 * @return bool 
 */

add_filter('wpforms_pro_admin_entries_export_allow_multiple_input_field', '__return_false')

Specific field type

/**
 * Filter to allow multiple input for specific fields.
 *
 * @link  https://wpforms.com/developers/wpforms_pro_admin_entries_export_allow_multiple_input_field/
 *
 * @param  bool    $allow      Default is true. 
 * @param  array   $field      The field.
 *
 * @return bool 
 */

function wpf_disallow_multiple( $allow, $field ) {
 
  if ( $field[ 'type' ] === 'checkbox') {
    return false;
  }

  return $allow;
}

add_filter( 'wpforms_pro_admin_entries_export_allow_multiple_input_field', 'wpf_disallow_multiple', 10, 2 );

With this option enabled by default, any modifications to these fields that have already been exported will display (modified) in the column heading.

the filter is enabled by default splitting up each multiple field into separate columns on export