Hi,
I also have the same problem and after reading the code for a while I think I found the cause:
in the file “post-my-contact-form-7\public\class-cf7-2-post-public.php” there is the function “array_to_single()” that reduce the array to one single value BUT APPLY ALSO the “sanitize_key()” function to the value of select;
this function is called by “define_public_hooks()” in the file “post-my-contact-form-7\includes\class-cf7-2-post.php” and for the moment I bypassed it with this code in the “functions.php” of the theme:
add_filter( 'wpcf7_posted_data_select', 'debug_cf2post_not_sanitize_select', 0, 3 );
add_filter( 'wpcf7_posted_data_select*', 'debug_cf2post_not_sanitize_select', 0, 3 );
add_filter( 'wpcf7_posted_data_dynamic-select', 'debug_cf2post_not_sanitize_select', 0, 3 );
add_filter( 'wpcf7_posted_data_dynamic-select*', 'debug_cf2post_not_sanitize_select', 0, 3 );
function debug_cf2post_not_sanitize_select( $value, $org, $tag ) {
if ( is_array( $value ) && isset( $_POST[ $tag->name ] ) && ! is_array( $_POST[ $tag->name ] ) ) {
$value = $_POST[ $tag->name ];
}
return $value;
}
ps: I’m using 6.0.5 version of the plugin;
I hope this help someone;