Export CVS separator

sercio 02 Dec, 2012
Hi,
i have done a form whit event Export CVS.
In this forms i have set in the event config ";" as delimiter, and i have put the flag in "add Titles" in the columns tab.
Well, in the export file the Title are "," separated and the fields are correctly ";" separated.....
GreyHead 02 Dec, 2012
Hi sercio,

You are correct, there's a bug in the action code. If you don't mind hacking the code you can change this line in administrator/components/com_chronoforms/form_actions/csv_export_gh/csv_export_gh.php around lines 263 and 280 from
fputcsv($csv, $titles);
to
fputcsv($csv, $titles, $delimiter, $enclosure);


Or you can get my v2 of the action here where the bug has been fixed.

Bob
sercio 02 Dec, 2012
Hi,
i have downloaded and installed the new action ( from panel Install action) but don't work.... The result is the same, title "," separated, fields ";" separated.. where is my mistake?
GreyHead 02 Dec, 2012
Hi sercio,

Hmmm, I'll check later - it looks OK in the version I have here. Time for dinner right now.

Bob

Later: the code looks good in the version on the site. Are you using the CSV Export v2 [GH] action? The old one will still be there as well.
sercio 02 Dec, 2012
Ops, you are right... i have used the old one. With the new action (in the custom actions section) all works well.
Thank you.
sercio 04 Dec, 2012
Just a question..... i can't insert a dynamic WHERE clause in export CSV. I tried to use the same syntax thath i use in db record loaded but it don't work....
RESOLVED the correct syntax is year={year}
GreyHead 04 Dec, 2012
Hi sercio,

In my v2 you should be able to use {input_name} in the WHERE box.

Bob
jack19 17 Dec, 2012
Hi Bob,
perhaps even around the line 280 from

fputcsv($file, $titles);

to

fputcsv($file, $titles, $delimiter, $enclosure);

:wink:
GreyHead 19 Dec, 2012
Hi jack19,

Yes, you are right - that line as well :-(

Bob

PS I've updated my original post and added a note in the bugs list post
This topic is locked and no more replies can be posted.