• Resolved labrat555

    (@labrat555)


    Dear folks,

    we have an issue with the textarea input field.
    We export a fairly complex form to be parsed/processed for a offline database. The textarea provide vital customer input and exports without quotes so the textarea field in csv export is messed up respective inserts line breaks. This is cumbersome to fix with 20 to 30 plus submissions and requires manual cleanup prior parsing. The allowance of line breaks as describend in topic “New lines in text area” in the csv export format confuses excel.exe and provide new lines in the csv file which confuses excel.exe despite the ” ” quote inserted. How can this be solved?
    I can provide a screenshot if needed.

    Thank you and all the best
    Labrat

    PS: great tool so far and we’re mostly happy with the results.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter labrat555

    (@labrat555)

    Screen shot
    Here is the screen shot, please note the CRLF character which results new line 20, 21, 22 and 23. This should be all in line 19.
    Thank you
    Labrat

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @labrat555

    I hope you are doing good today.

    As mentioned by you in your first reply, could you share a screenshot of this in google drive or dropbox so we could be on the same page when we will ask our Devs about this issue?

    Kind Regards,
    Kris

    Hello @labrat555 !

    I hope all is well.

    I’ve seen this issue before with Excel (I think only Excel has this odd behaviour, as things such as Libre Office, Google Docs and Apple Pages worked well) and can confirm it exists, but it’s actually an Excel bug.

    I’ve asked our Second Line Support team whether it would be possible to run a filter before exporting the CSV to replace the CR LFs with more correct \r\n. We’ll update you here as soon as we hear back from them.

    Warm regards,
    Pawel

    Hello once again @labrat555 !

    I trust you’re doing well today!

    Our Second Line Support team has shared the following snippet you can use to change the CR LFs during export:

    add_filter( 'forminator_entry_meta_value_to_string', function( $value ){
    	if( is_string( $value ) ){
    		// $value = preg_replace('~(*BSR_ANYCRLF)\R~', "\r\n", $value);
    		$value = preg_replace('~\R~u', "\r\n", $value);
    	}
    	return $value;
    } );

    You can add this snippet to your child theme’s functions.php (if you’re using a child theme, otherwise I don’t recommend doing that as an update will remove this snippet). Or you can place it in a .php file and add <?php at the start, in wp-content/mu-plugins. The filename can be anything, but it needs to be a .php file.

    Warm regards,
    Pawel

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @labrat555 ,

    We haven’t heard from you for a while now, so it looks like you don’t have more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘textarea Export settings’ is closed to new replies.