The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
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) |
RE: Carriage Returns Stripped from TextArea Submissions - Ben - Feb 12th, 2010 Hi Jim, Sorry for the wait. Darn day job. ![]() 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"} And just tweak it to this: Code: {elseif $field_type == "textarea"} nl2br_excel is a new modifier I added in 1.0.0 to get around the newline problem. Let me know how it goes! ![]() - Ben RE: Carriage Returns Stripped from TextArea Submissions - jlkane - Feb 13th, 2010 (Feb 13th, 2010, 1:41 PM)Ben Wrote: Hey Jim, 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! ![]() - 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 |