diff --git a/includes/class-cf7-api-admin.php b/includes/class-cf7-api-admin.php index 106fd1d..e31f210 100644 --- a/includes/class-cf7-api-admin.php +++ b/includes/class-cf7-api-admin.php @@ -493,7 +493,11 @@ function get_record( $submission , $qs_cf7_data_map , $type = "params", $templat }else{ $value = isset($submited_data[$form_key]) ? $submited_data[$form_key] : ""; - //flattan radio + // handle line breaks (suggested by Felix Schäfer) + $value = preg_replace('/\r|\n/', '\\n', $value); + $value = str_replace('\\n\\n', '\n', $value); + + // flatten radio if( is_array( $value ) ){ $value = reset( $value ); }