• We have a custom checkout textarea field we are using for guest message. We would like to let people have line breaks in it. I have confirmed that the form post does still have the line breaks, but they have been lost by the time they make it into the wp_postmeta table. My research suggests this is not default wordpress behavior, and I don’t have any replacements in my functions.php. Can you guys confirm that booster does this? If so, is there a workaround to allow line breaks?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @rbeevers and @jwebadgility,

    Already started fixing this. One question though – I easily managed to fix it on “Thank You” page and in emails – but got stuck on showing line breaks on admin order edit page. Would that be important for you (i.e. admin order edit page)?

    Thread Starter rbeevers

    (@rbeevers)

    My particular usage involves getting the field from the post meta and displaying it with custom formatting, so I just need it to be stored in the db with the breaks intact.

    Same here – although in future releases it would be nice to edit the gift message in the admin without losing the formatting. But for now, just fixing the post meta storage with formatting is good for me.

    Hi @rbeevers and @jwebadgility,

    Ok, got it. Please download the development version here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear). If you are a Booster Plus user – please contact me through our website, and I will send you the development version for Plus.

    Now in “WooCommerce > Settings > Booster > Cart & Checkout > Checkout Custom Fields” there are two new option checkboxes: Textarea Field Values and Textarea Line Breaks. You need to disable the Textarea Field Values checkbox – so it won’t “clean” textarea field values from line breaks. And if you want line breaks to be replaced with <br> on “Thank You” page, in emails etc., you need to enable the Textarea Line Breaks checkbox.

    Unfortunately in admin order edit page, line breaks won’t be displayed for now, but I’m working on that.

    Please let me know if it’s not working as expected, or if you have any questions.

    P.S. And if you like the plugin, please leave us a rating.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘custom checkout fields not storing line breaks’ is closed to new replies.