Hi!
I have a reservation form. When the form is filled out, the data is saved in a database table. This works OK.
As a next step I want to save a CSV with all data from the table in a directory on the server.
I got the file to save, but is still empty. I think I need to have a different Data Provider for the CSV action.
How do I get the data that is read by Read Data action in the CSV file? What do I specify as the Data Provider?
There is currently no XLS save function? Only CSV?
Kind regards,
Jip
I have a reservation form. When the form is filled out, the data is saved in a database table. This works OK.
As a next step I want to save a CSV with all data from the table in a directory on the server.
I got the file to save, but is still empty. I think I need to have a different Data Provider for the CSV action.
How do I get the data that is read by Read Data action in the CSV file? What do I specify as the Data Provider?
There is currently no XLS save function? Only CSV?
Kind regards,
Jip
Hello jj135,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I save form data to a database table?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I save form data to a database table?
P.S: I'm just an automated service😉
The Read Data action name="read_data_12". Model name "Data12". The debuggers sows an array with all the data....
In the CSV action I tried as Data Provider:
{data:read_data12}
{data:Model12}
Or just plain 'Model12' and 'read_data12'
This did not work. I got an empty CSV...
In the CSV action I tried as Data Provider:
{data:read_data12}
{data:Model12}
Or just plain 'Model12' and 'read_data12'
This did not work. I got an empty CSV...
Now I tried {var:read_data12}
This showed me all records in the Excel, but every line says 'Array' insstead of showing the actual data of the records... The first line says 'Data12' (column title I guess)
This showed me all records in the Excel, but every line says 'Array' insstead of showing the actual data of the records... The first line says 'Data12' (column title I guess)
I probably need somthing like {var:read_data12.data}? But this also does not put any data in the CSV file... Any suggestions?
This is the data from the debugger:
In need read_data12 in the CSV.
In need read_data12 in the CSV.
Array
(
[titel] => test
[chronoform] => reserveren
[event] => submit
[evenement] => test
[kaarten] => 2
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sads
[nieuwsbrief] => Nee
[verzenden] =>
[9e1e2a3db4910608585af23807040050] =>
[4495b413f6e3bac190fc5d78be0a1d25] => i2jooh2hrb8mq614hqrj4pm3i2
[e5df12cfb0317a80490c8b43c18851d7] => ml1o9vj44ltl7s0m2q5094o9i2
[_gat] => 1
[_ga] => GA1.2.190844832.1501412382
[_gid] => GA1.2.290154437.1501412382
[Itemid] => 709
[option] => com_chronoforms6
[view] => form
)
Array
(
[validate_fields6] => Array
(
[log] => Automatic validation enabled.
[var] => 1
)
[save_data9] => Array
(
[data] => Array
(
[titel] => test
[chronoform] => reserveren
[event] => submit
[evenement] => test
[kaarten] => 2
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sads
[nieuwsbrief] => Nee
[verzenden] =>
[9e1e2a3db4910608585af23807040050] =>
[4495b413f6e3bac190fc5d78be0a1d25] => i2jooh2hrb8mq614hqrj4pm3i2
[e5df12cfb0317a80490c8b43c18851d7] => ml1o9vj44ltl7s0m2q5094o9i2
[_gat] => 1
[_ga] => GA1.2.190844832.1501412382
[_gid] => GA1.2.290154437.1501412382
[Itemid] => 709
[option] => com_chronoforms6
[view] => form
[created] => 2017-07-30 14:20:17
)
[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `d1ajs_chronoengine_chronoforms_data_reserveren` (`evenement`, `kaarten`, `naam`, `email`, `bijzonderheden`, `nieuwsbrief`, `created`) values ('test', '2', 'Jip', 'jip@inxpact.nl', 'sads', 'Nee', '2017-07-30 14:20:17');
)
[var] => Array
(
[evenement] => test
[kaarten] => 2
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sads
[nieuwsbrief] => Nee
[created] => 2017-07-30 14:20:17
[aid] => 73
)
)
[read_data12] => Array
(
[log] => Array
(
[0] => SELECT `Data12`.`aid` AS `Data12.aid`, `Data12`.`created` AS `Data12.created`, `Data12`.`evenement` AS `Data12.evenement`, `Data12`.`kaarten` AS `Data12.kaarten`, `Data12`.`naam` AS `Data12.naam`, `Data12`.`email` AS `Data12.email`, `Data12`.`bijzonderheden` AS `Data12.bijzonderheden`, `Data12`.`nieuwsbrief` AS `Data12.nieuwsbrief` FROM `d1ajs_chronoengine_chronoforms_data_reserveren` AS `Data12`;
)
[var] => Array
(
[0] => Array
(
[Data12] => Array
(
[aid] => 47
[created] => 2017-07-28 16:03:37
[evenement] => Afrikaanse Avond
[kaarten] => 1
[naam] => Jip Jonker
[email] => jip@inxpact.nl
[bijzonderheden] => sdfdfsdf
[nieuwsbrief] => Nee
)
)
[1] => Array
(
[Data12] => Array
(
[aid] => 63
[created] => 2017-07-28 17:25:45
[evenement] => Tiel van het evenement
[kaarten] => 1
[naam] => Jip Jonker
[email] => jip@inxpact.nl
[bijzonderheden] => hgffghfghgfhhgh
[nieuwsbrief] => Nee
)
)
[2] => Array
(
[Data12] => Array
(
[aid] => 64
[created] => 2017-07-28 17:28:09
[evenement] => Tiel van het evenement
[kaarten] => 1
[naam] => Jip Jonker
[email] => jip@inxpact.nl
[bijzonderheden] => hgffghfghgfhhgh
[nieuwsbrief] => Nee
)
)
[3] => Array
(
[Data12] => Array
(
[aid] => 65
[created] => 2017-07-30 11:00:09
[evenement] => test
[kaarten] => 1
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sadasd
[nieuwsbrief] => Nee
)
)
[4] => Array
(
[Data12] => Array
(
[aid] => 66
[created] => 2017-07-30 11:01:24
[evenement] => test
[kaarten] => 1
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sadasd
[nieuwsbrief] => Nee
)
)
[5] => Array
(
[Data12] => Array
(
[aid] => 67
[created] => 2017-07-30 11:03:42
[evenement] => test
[kaarten] => 1
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sdsadddsd
[nieuwsbrief] => Nee
)
)
[6] => Array
(
[Data12] => Array
(
[aid] => 68
[created] => 2017-07-30 14:15:54
[evenement] => test
[kaarten] => 1
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => asdsasds
[nieuwsbrief] => Nee
)
)
[7] => Array
(
[Data12] => Array
(
[aid] => 69
[created] => 2017-07-30 14:17:58
[evenement] => test
[kaarten] => 1
[naam] => qewqwe
[email] => jip@inxpact.nl
[bijzonderheden] => asdasd
[nieuwsbrief] => Nee
)
)
[8] => Array
(
[Data12] => Array
(
[aid] => 70
[created] => 2017-07-30 14:19:07
[evenement] => test
[kaarten] => 1
[naam] => qewqwe
[email] => jip@inxpact.nl
[bijzonderheden] => asdasd
[nieuwsbrief] => Nee
)
)
[9] => Array
(
[Data12] => Array
(
[aid] => 71
[created] => 2017-07-30 14:19:34
[evenement] => test
[kaarten] => 2
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sads
[nieuwsbrief] => Nee
)
)
[10] => Array
(
[Data12] => Array
(
[aid] => 72
[created] => 2017-07-30 14:19:55
[evenement] => test
[kaarten] => 2
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sads
[nieuwsbrief] => Nee
)
)
[11] => Array
(
[Data12] => Array
(
[aid] => 73
[created] => 2017-07-30 14:20:17
[evenement] => test
[kaarten] => 2
[naam] => Jip
[email] => jip@inxpact.nl
[bijzonderheden] => sads
[nieuwsbrief] => Nee
)
)
)
)
)
Hi Jip,
The CSV action data provider requires a specific data structure which can be achieved using
Best regards,
Max
The CSV action data provider requires a specific data structure which can be achieved using
{var:read_data12.[n].Data12}
Best regards,
Max
Hi Max, yes this works! I knew there had to be a way. Never would have thought of the [n] ;-) Have missed that in the forum / documentation somewhere? Anyway, it works for me now. Thanks!
I also changed the delimiter to ; so I could open the file in Excel with the fields separated in columns. The comma delimiter opened the records in one column.
Kind regards, Jip
I also changed the delimiter to ; so I could open the file in Excel with the fields separated in columns. The comma delimiter opened the records in one column.
Kind regards, Jip
Hi Jip,
I think its mentioned in a few forum posts only, its not common to use this syntax, but its required for the CSV action, and maybe needed in special cases.
Best regards,
Max
Have missed that in the forum / documentation somewhere?
I think its mentioned in a few forum posts only, its not common to use this syntax, but its required for the CSV action, and maybe needed in special cases.
Best regards,
Max
This topic is locked and no more replies can be posted.