Forums

Download content of a database table

JoCo 15d ago

Hi Max,

is it possible to download the content of a database table with the download action?

Is there an example ?

Regards, JoCo

Max_admin 15d ago
Answer

Hi JoCo

if the table is large then it may not work because PHP will timeout or the memory will be exceeded, but you can add this to your ChronoForms8 page submit:

  1. Read Data to red all table rows
  2. CSV to add all the Read Data rows to file, and set the CSV "Action" to Download
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
JoCo 14d ago

Thank you Max for the quick answer.

The download is running correctly and the file is my local download directory.

But after the download action the form keeps busy. The busy icon keeps spinning. 

The action is not ended. How come?

Regards JoCo

Max_admin 14d ago

Hi JoCo

This is expected. this is how the download works in browsers, if you want to change this then you need to add a link to the form page with the CSV action, that page should have a different "Page Group", this way the page can be called through a link:

form-url&chronopage=page-name

when you do this the file will download but the form will not be loading

You may also "Redirect" to that page at the submit of your current page, this will have the same effect

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
JoCo 14d ago

Sorry Max, I don't quite get it.

first I don't know how a form-url looks like.

second I have a form with a read data action and a csv action on the submit tab. Is that correct?

Where should I put the link?

Regards JoCo

JoCo 11d ago
1 Likes

Hello Max,

don't bother anymore, I've got it.

I placed the read data and the csv on the load tab and call the form with a menu-link.

Regards JoCo

Max_admin 11d ago

Hi JoCo

Great, sorry for the late reply

So when you have the Read Data and CSV in a different form page, you call the form using the same form link you have now and add &chronopage=page-alias to that link

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.