Greyhead.net

Home ChronoForms How-to docs CFv4 CSV Export v2 [GH] action

CFv4 CSV Export v2 [GH] action

CFv4 CSV Export v2 [GH] action

This is an new ChronoForms v4 CSV Export v2 [GH] action to export records from a Joomla! database table to a CSV file (comma separated variable):

  • Fully configurable allowing choice of table, columns and rows for export
  • Row and column filtering either pre-set in the action configuration or dynamically set fror the form results.
  • Configurable folder and file names - including using form variables
  • Configurable separator and 'quote' characters.
  • Uses PHP fputcsv() to handle escaping special characters
  • Configurable download options; mime-type, no save, immediate download 
  • [new in v2] Use the {input_name} syntax in the WHERE box

Note: This action is for ChronoForms v4 only; it should work with both the Joomla! 1.5 and 1.6/1.7/2.5 versions.

Please install this action using the Install Action icon in the ChronoForms Forms Manager to upload the zip file.

To test:

  1. Create a new form with the form wizard, give the form a anme and publish it then add just a Submit Button to the Preview box;
  2. On the Events tab add a Show HTML action to the On Load event
  3. Look in the DB Operations tab for the CSV Export [GH] and drag that to the On Submit Event; followed by a Show Thanks Message and Debugger actions from the Core Actions group
  4. Click the centre 'spanner' icon on the the CSV Export [GH] action and select a table from the first drop down (I used jos_categories). Save and close the action configuration.
  5. Click the centre 'spanner' icon on the the Show Thanks Message action and add the following code to the message box:
    Code: Select all
    You may download your file from here .

    {csv_count} records were exported.
    The file size is {csv_size} kb.
  6. Save & Close the form and view it in the Front End.
  7. Click the Submit button and you should see a message like this:
    You may download your file from here. 17 records were exported. The file size is 0.3 kb.
    with more detailed information from the debugger.
That is the simplest configuration and will export all of the data in the table. You can configure the plug-in to be much more selective in terms of the data exported. See the action Help Tab for more information.

Main features:

  • Select any table from the Joomla! database
  • Specify the export folder and file name including form results and new variables (table name, random number, datetime string)
  • Specify MySQL WHERE and ORDER BY clauses to filter and sort the data
  • Specify lists of Included / Excluded columns for simple selection
  • OR Specify a list of Column Titles and column names to build a custom set of columns; this can include MySQL Functions.
  • You can use Form inputs to specify the table, folder, file name and the MySQL WHERE and ORDER BY clause to make the export interactive. This feature is only available to registered users and should be used with care as the results may be used in MySQL queries.
  • Specify the charaters to be used to separate fileds and for quoting fields.
  • Specify the main download options. By default the action saves the file on the server and provides you with download links to use in a Thank You page or an email.
The action was written in Joomla! 1.6.3 and has been tested in Joomla! 1.5.23 It should be treated as beta code and used with care. Please report any bugs you find here for fixing.
File Name:ChronoForms v4 action csv_export_gh.zip
File Size:9.48 KB
File Type:application/zip
Hits:2294 Hits
Created Date:Monday April 16, 2012 01:35:20
Last Updated Date:Monday April 16, 2012 01:35:10

Your cart

There are 1 items in your cart
the best hostingpsd to html servicebuy vpn