Database collector and export to Excel

22 Jan 2014 00:15 - 25 Oct 2017 22:36 #1 by Demis [Fox-Labs]
Database collector and export to Excel was created by Demis [Fox-Labs]
Database table

All the contact requests received by all forms will be automatically saved to the database by default.
For that purpose, the table #__foxcontact_enquiries is automatically created during the installation process.
The symbol #__ in the name of the table stands for your own database table prefix.
Fox Contact can be safely uninstalled without the risk of accidental data loss, because that table will not be deleted during the uninstall process.

Export collected enquiries in csv

Contact requests which have been collected in the database, can be easily exported in csv format , in order to be imported in a spreadsheet such as Excel or OpenOffice.
  1. Go to "Components" > "Fox Contact".
  2. Click on the "Enquiries received" tab.
  3. Optionally set some filters (details of filter fields follows)
  4. Clicking on the export button on the upper tool bar will start the download of a csv file containing all the rows corresponding to the filters set. Then those records are marked as "exported", to avoid a subsequent exportation.


The available filter fields are the following
  • "Content" is a global full text search
  • The "Initial date" and "Final date" delimit the time range
  • "Include exported items" selector allows the contact requests which have already been exported to also be shown. Useful for exporting items twice
  • The "Forms" selector limits the enquiries shown to those which belong to the specified forms. Multiple selection is allowed

Multiple Forms

Many sites have more than one form - one (or more) menu based contact pages, or perhaps using the module form with {loadposition} in an article, and often a form module in a sidebar.
Quite often, these different forms have different fields, so care needs to be taken when exporting them.
If more than one different forms are exported together then the column headings in the csv file will not all be there, and while all the fields will be present, they will not all line up in the correct columns.
The simplest way to deal with this is to export each form separately, using the "Forms" filter described above.

Be aware that the same thing can happen if you change the fields on a form some time after it is first used.
In that case, either -
  • note the date when the form is changed and export:
    1. The first batch of records by using the "Final date" filter
    2. The rest using the "Initial date" filter
  • or export the whole form and then manually cut-and-paste the data in the spreadsheet

Delete enquiries

To delete some enquiries, select them and click the "Delete button" on the toolbar as shown above ⇡.
Note that by default the enquiries already exported are not visible due to the filter "include exported items", which is initially set to "No". So, if you want to delete your exported enquiries, first of all you must switch the filter "include exported items" to "Yes" to be able to select them.

How to disable database saving

Starting from the versions 2.5.23 and 3.3.2 this feature can be selectively disabled for a specific form under form options.


This feature was introduced in versions 2.5.8 and 3.2.2
The following user(s) said Thank You: mario hamwi, Anton

Please Log in or Create an account to join the conversation.