The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
|
Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16) +--- Thread: Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems (/showthread.php?tid=1316) |
Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems - HRZ_UniBi - May 17th, 2011 Hello to all! Currently I have an actual problem, that export to Excel still des not work (see other thread) and some new problems: 1.) When creating the export as Excel (which is HTML) or the HTML/printer-friendly export the links to the attachments are created like this: <td> <img src="/<FILENAME>" /> </td> instead of <td> <a href="http://<SERVERNAME>/<PATH_TO_UPLOADS/<FILENAME>"> <FILENAME>" </a> </td> 2.) My Formtools server is running on an *nix box. When exporting/saving all Non-ASCII characters are exported in *nix format instead of Windows encoding. Is there a way to correct these problems via settings? Or what can I do? With regards, Peter. RE: Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems - HRZ_UniBi - May 18th, 2011 Hello! I got some infos about the problems by myself... (May 17th, 2011, 4:21 AM)HRZ_UniBi Wrote:This seems to be the result of the fact, that there is any extra representation made for the field type "File". It's handled by the last method: {else} {$value} {/if} So to get the chance of having a field with a correct link a hidden field with the content <GLOBAL_UPLOAD_URL>/<FILENAME> has to be created. Please can anyone help how this can be done? (May 17th, 2011, 4:21 AM)HRZ_UniBi Wrote: 2.) My Formtools server is running on an *nix box. When exporting/saving all Non-ASCII characters are exported in *nix format instead of Windows encoding. Here I also got some information (or request for enhancement ;-) : When I export to CSV and import into Excel and select UTF8 as source everything is fine. So it would be a great thing to have an export feature where I can select the export charset. With regards, Peter. RE: Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems - Ben - Jun 3rd, 2011 Hey Peter, I'm *so* sorry for not responding sooner. Quote:So to get the chance of having a field with a correct link a hidden field with the content Sure, no problem! Would it be possible to post your entire Export Type smarty markup? I'd like to take a look at it and compare it with what I have to make sure we're working off the same code. This is found at this page: Modules -> Export Manager -> Edit Export Group -> Export Types tab -> Edit Export Type. Quote:When I export to CSV and import into Excel and select UTF8 as source everything is fine. So it would be a great thing to have an export feature where I can select the export charset. I wonder if this is related to the headers being sent for that export group? Edit the Excel Export Group in the Export Manager module and look at the first tab. Take a look in the headers section (and possibly as a meta tag in the Smarty markup). If memory serves, there's a header there telling it to dole up the info as UTF-8. Hmm... I like the fact that it's customizable, but it's not the most user-friendly thing ever... perhaps a dropdown to define the charset? - Ben RE: Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems - HRZ_UniBi - Jun 6th, 2011 Hello! Don't worry about the late reply. Here's the info from the export manager Header: Code: Pragma: public Content: Code: <html> And here's the code from the standard export type: PHP Code: <h1>{$form_name}</h1> Yes, it is set up as UTF-8. Whatever Excel thinks it is in its' mind... Is there any difference between utf-8 and UTF-8 ;-) With regards, Peter. RE: Bugs/probs in export to HTML/Excel omits URL-prefix for uploads / Umlaut problems - Ben - Jun 18th, 2011 Peter! Again, sorry for not responding sooner. I do tend to forget who I'm supposed to get back to at times, so never feel bad sending an impatient email to remind me. This was surprisingly fiddly. So I got it working, but not in the most elegant fashion. First off, use this Smarty code for your Export Type: Code: <h1>{$form_name}</h1> You'll see all I did was add an extra clause for "file", as you mentioned above. The thing is, the settings for that field are only actually populated if they've been defined for that file field type. So they don't get populated with the default values. Daft! This has changed in 2.1.0 - there's proper inheritance going on for all field type settings, so this wouldn't be an issue. Anyway, to get it working, you'll also need to click on "Options" for the File field (Edit Form -> Fields tab) and click "Customize Settings". In the table that appears, choose "File upload folder" then just click save (don't change the settings). And that should be it! It should now provide a full clickable link to the uploaded file. All the best - Ben |