Hi @nonchiedercilaparola,
In that case then, yes, this is (inherently) by design. But not quite ?? Let me explain.
A name
field is a field type that can be split into multiple columns. By default all these fields will return separate field values on the next line to avoid confusion. So yes it is by design, but no, not specifically for the name
field.
There are 2 solutions.
1. Entries in Excel comes with a general settings page, located under “Forms” > “Settings” > “Entries in Excel”. So these are NOT the settings on a specific form.
On that settings page you can see Split multi-fields (name, address) into multiple columns
. Most of the time people have this enabled, and then names are split over multiple columns.
2. You can change the behavior of the newline \n
for a <space>
for name
fields by applying this code to your theme’s functions.php
:
/**
* Concatenate name fields on a single line.
*/
add_filter('gfexcel_field_value_name', static function (string $value) {
return str_replace("\n", ' ', $value);
});
Note: You only need this if you don’t go for option 1.
If you want more information about this filter, please checkout the documentation website.
Hope this helps you out.