Forums

Chronoforms v8 - CSV Export Action

gotpowr 11 Nov, 2024

I'm trying to use the new export action to export data.

I have a read data (read_data21) that I have verified using debug that it returns data.

However, adding the "CSV Export", a "blank" file is exported.

I tried to specify the columns, but only headings with no data is exported.

See pic below of config.  Again, i did verify multiple records show up under the read_data21 via the form debug.

Thanks!

Max_admin 11 Nov, 2024
Answer

data source in CSV should be set to {var:read_data21}

And you should use the quote function when getting the data value in the WHERE statement or you may get SQL injection

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
gotpowr 11 Nov, 2024

Thanks Max, works perfectly!

And thanks for the hint, I used the quote function as well, I appreciate the heads up about the SQL injection.

Does chronoforms 7 have something similar for SQL injection? (I'm going to start converting my forms to V8 where they can, but I'd like to make sure my V7 are protected).

Max_admin 11 Nov, 2024

No problem, v7 will quote values when you use the v7 conditions syntax, which was based on PHP arrays

but v8 does not use that format, you use SQL directly, and so you need to quote, although the next update should auto quote data parameters

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.