The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Carriage Returns Stripped from TextArea Submissions - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Carriage Returns Stripped from TextArea Submissions (/showthread.php?tid=314)

Pages: 1 2 3


RE: Carriage Returns Stripped from TextArea Submissions - Ben - Feb 12th, 2010

Hi Jim,

Sorry for the wait. Darn day job. Smile

I'll take a look at it now.

- Ben


RE: Carriage Returns Stripped from TextArea Submissions - jlkane - Feb 12th, 2010

Thanks Ben!


RE: Carriage Returns Stripped from TextArea Submissions - Ben - Feb 12th, 2010

Huh...! You're quite right, I can see the problem now. Neat...

I'll look into this tomorrow - I think it'll take a little digging & I have a few other support posts to respond to. Keep you posted -

Ben


RE: Carriage Returns Stripped from TextArea Submissions - jlkane - Feb 12th, 2010

Glad you were able to replicate the problem, Ben.

Thanks for your persistence,

Jim


RE: Carriage Returns Stripped from TextArea Submissions - Ben - Feb 13th, 2010

Ah, I found the problem. It looks like I introduced it a few versions ago of the Export Manager when solving another problem.

What happened was that newlines weren't being converted properly to <br />'s in the Print Preview export type, so all text in a single cell was being smushed into a single block. So, I remedied that by adding in a nl2br clause for textarea fields in both the Print Preview and Excel export types. But I guess I didn't QA the Excel type well enough: as you noticed, it's causing it to be broken into multiple cells. On my own installation I wasn't seeing this because upgrading the Export Manager module does NOT upgrade the export content (it can't, because it would overwrite any customizations that people would make). So even though I'd kept my module up to date, the actual export type content was slightly different - actually VERY different. I'd made some significant changes when playing around with it and had unwittingly fixed the newline problem.

Alright, now to fix it...! I'll release an update to the Export Manager module today and then post instructions on the additional manual fix you'll need to do to get it working properly.

Keep you posted!

- Ben


RE: Carriage Returns Stripped from TextArea Submissions - jlkane - Feb 13th, 2010

Thanks for keeping me up to date on your progress, Ben.

Jim


RE: Carriage Returns Stripped from TextArea Submissions - Ben - Feb 13th, 2010

Hey Jim,

I just released the 1.0.0 final release of the Export Manager module, and included this fix. So here's how to fix the problem on your site:

1. Upgrade your Export Manager module to the new release. To do this, just go to Settings -> Main tab in your Form Tools admin section and click on "Check for Updates".
2. After upgrading, edit the "table format" Excel option type. There, look for these lines (near the bottom):
Code:
{elseif $field_type == "textarea"}
  {$value|nl2br}
{else}
  {$value}
{/if}

And just tweak it to this:
Code:
{elseif $field_type == "textarea"}
  {$value|nl2br_excel}
{else}
  {$value}
{/if}

nl2br_excel is a new modifier I added in 1.0.0 to get around the newline problem.

Let me know how it goes! Smile

- Ben


RE: Carriage Returns Stripped from TextArea Submissions - jlkane - Feb 13th, 2010

(Feb 13th, 2010, 1:41 PM)Ben Wrote: Hey Jim,

I just released the 1.0.0 final release of the Export Manager module, and included this fix.
<snip>
Let me know how it goes! Smile

Terrific!

Curiously, when I dipped into the code for the "table format" Excel option type, I found this:
{elseif $field_type == "textarea"}
{$value}
{else}
{$value}
{/if}

...but updating it per your instructions to this:
{elseif $field_type == "textarea"}
{$value|nl2br_excel}
{else}
{$value}
{/if}
...did the trick!

Now I have 58 rows the Excel output for the 58 submissions in the database!

Thanks so much for your help, Ben! Form Tools is SUCH a gift to the community!

Jim


RE: Carriage Returns Stripped from TextArea Submissions - Ben - Feb 13th, 2010

Excellent, this is very good to hear! Big Grin

- Ben


RE: Carriage Returns Stripped from TextArea Submissions - jlkane - Feb 15th, 2010

Ben,

If you could extend this fix to the CSV export, it would be both a healthy piece of housekeeping AND it would provide me a useful work-around for the problem described in Thread #503.

Jim