• Resolved nonchiedercilaparola

    (@nonchiedercilaparola)


    hi, i wuold like to know if it is normal that the blank space between name and surname is interpreted as “line break” in the exported exel file?

    Gravity Entrie:
    NAME SURNAME

    Exel Cell:
    NAME
    SURNAME

    From settings i can see nothing usefull to my scope so can someone helpe me?

    Regards

    Luigi

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    @nonchiedercilaparola are you using the name field? Or another type?

    Thread Starter nonchiedercilaparola

    (@nonchiedercilaparola)

    I use Gravity Name&Surname Field that is a chained field (suffix field, name field, surname field and prefix faild)

    Plugin Author Doeke Norg

    (@doekenorg)

    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.

    Thread Starter nonchiedercilaparola

    (@nonchiedercilaparola)

    Thanks for support:)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘After exportation “blank space” is interpreted as “line break”’ is closed to new replies.