CF8 CSV File export no Data

Export data to CSV in ChronoForms.

Overview

The issue occurs when the form uses Ajax submission, which prevents the CSV action from receiving the data source correctly.
Disable the Ajax Form setting in the form configuration to allow the CSV export to process the data source and populate the file properly.

Answered
ChronoForms v8
mo mobusag 11 Dec, 2024

Hello everyone,Since version 8.0.23, there is the possibility of a CSV export. However, I haven't fully understood how this should work. I have created a selection in the Load tab, which I then pass to the Submit via a button.

In the Submit, I implemented a Read-Data function, which works correctly when output in a table. However, when I try to use the same for a CSV export, I get an empty CSV file. The data is being read correctly because if I invoke the file differently, no file is generated, and the process stops. What am I doing wrong?

After the selection, I use a read_data24, which I set as the Data Source for the CSV. Unfortunately, I can’t provide any further details, or perhaps I’m missing something here. When I specify the column headers via Behaviors, they are displayed correctly in the CSV, but the data columns remain empty.

In the debug log, I once saw the following:

Files

Array
(
)

This makes me feel that something is going wrong with the CSV generation. Can anyone help me with this?

Thanks.

Max_admin Max_admin 11 Dec, 2024

the data source is a variable so it should be {var:read_data24}

did you try that ?

can you post a screenshot of the CSV action settings ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mo mobusag 12 Dec, 2024

Hello Max,

The blue circle represents the starting point. With green, I populate a table, which works without any issues. With red, I want to populate the CSV, but unfortunately, none of the following expressions work:

  • {var:read_data24}
  • {data:read_data24}
  • read_data24 (as with the table)

With "var" or "data," nothing happens at all. Only with (read_data24) is a CSV generated, but it is then either empty or filled with the column headers that I entered under CSV Columns.

Thank you!

Bildschirmfoto-2024-12-12-um-07.46.40.png
Max_admin Max_admin 12 Dec, 2024

I tested here on the content table and it works fine, please try to remove the "Output format" behavior in the CSV, does it change the result ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mo mobusag 12 Dec, 2024
Answer
1 Likes

Max Thank youIt Works i had in the Settings the Ajax Form on yes. Now without Ajax it works.Thanks a lot

This topic is locked and no more replies can be posted.