Export data to CSV files

Export saved submissions to CSV in the front-end

Note: These features are part of the Visforms Subscription and are not included in the free Visforms version.

This feature allows you to display a CSV export button for authorized users in the front-end data views of a form. This export button can be used to export the currently displayed data to a CSV file.

Export saved transfers in the frontend to CSV

Configuration

Configuring to export saved transfers in the frontend to CSV is done in 4 steps (displayed via a menu) or 5 steps (displayed via the plugin):

  • Form configuration: Enable CSV export for the form.
  • Form configuration: Specify CSV export details.
  • Form configuration: Specify user rights for CSV export.
  • Field configuration: Enable CSV export for the field.
  • Plugin configuration: Enable CSV export for display via the plugin.

Form Configuration

Activate the export for the form

In order for the Export to CSV entry to be displayed in the Download document listbox in the data view, the feature must be activated in the form configuration.

  • Form Configuration » Tab: Data Display in Frontend

    Group: Downloads » Parameter: Show CSV Export Button = “Yes”.

Form Configuration >> 'Data Display in Frontend' Tab

Specify Export Details

Numerous parameters are available for CSV export to control the export format and content in detail.
These include:

  • Does the generated CSV file have a header?
  • Which separator should be used between field values?
  • Which character set should be used for the file?
  • What name should the export file receive?
  • Should only published data be exported?
  • Which overhead fields should be exported?
  • Which form fields should be exported (see Field Configuration)?

These parameters are located here:

  • Form Configuration » Tab: Advanced

    Group: CSV Export

Form Configuration >> Tab 'Advanced'

Set user rights for export

In order for the Export to CSV entry to be displayed in the Download document listbox in the data view, the user must be granted permission to do so.
Permission to do so is controlled by the access rights for their user group.

The access rights for their user group can be configured hierarchically in two places:

  • The Visforms Options settings are located above the Form Configuration settings in the hierarchy.
  • The Visforms Options settings inherit the settings to the Form Configuration.
  • The Form Configuration settings inherit the settings from the Visforms Options settings.

These parameters are located here:

  • Form Configuration » Tab: Form Permissions

    User Role » Action Export form data from frontend (CSV) = ‘Allowed’

  • Visforms » Dashboard » Button Options » Tab Permissions

    User Role » Action Export form data from frontend (CSV) = ‘Allowed’

Form Configuration >> Tab 'Form Permissions'

Field Configuration

The field configuration defines the following two settings:

  • Will the form field be exported?
  • What name will the form field receive for export?

These parameters are located here:

  • Field Configuration » Tab: Data Usage in the Frontend

    Group: CSV Export Settings » Parameter: Export field during data export = “Yes”. Group: CSV Export Settings » Parameter: Different label for CSV = “My name for the field”.

Field Configuration >> Tab 'Data Usage in the Frontend'

Plugin Configuration

If the Content Plugin - Visforms Data is used to display the data in the frontend, the configuration is done via an additional plugin parameter in the plugin string. The plugin string is inserted into the article or module as additional text to display the form data at that location in exchange for the plugin string in the frontend.

In order for the Export to CSV entry to be displayed in the Download Document listbox in the data view via the plugin, the following settings must apply (both settings are required):

  • Form Configuration » Tab: Data Display in Frontend

    Group: Downloads » Parameter: Show CSV Export Button = “Yes”.

  • The parameter displaycsvexportbutton must be inserted in the plugin string with the value true.
    {vfdataview}{... ,"displaycsvexportbutton":"true", ...}{/vfdataview}
    

Summary

When is the CSV export button visible?

Three factors determine whether a CSV export button is displayed to a user in a data view on the frontend.
The CSV export button is only displayed if all three of the following conditions are met:

  • Has CSV export been enabled for the frontend?
    • Form configuration » Tab: Data display in the frontend

      Group: Downloads » Parameter: Show CSV export button = “Yes”.

  • Does the user have the right to export data to CSV on the frontend?
    • Form Configuration » Tab: Form Permissions

      User Role » Action Export form data from frontend (CSV) = ‘Allowed’

    • Visforms » Dashboard » Button Options » Tab Permissions

      User Role » Action Export form data from frontend (CSV) = ‘Allowed’

  • Is at least one record displayed in the data display in the frontend?

Which records are exported?

The exported records are selected via the data view in the frontend.

Note: All currently displayed records are always exported, regardless of any pagination.

The currently displayed records depend on

  • the user permissions,
  • the setting for the permitted status of the records:
    • Form Configuration » Tab: Advanced

      Group: CSV Export » Parameter: Published Records Only = “Yes”.

  • the current search filter settings.

If the Content Plugin - Visforms Data is used for display, the displayed data also depends on the plugin parameters for selecting records.

What information is exported?

The following settings determine which information the entry in a row in the CSV export file contains:

  • At the form level, all settings for this can be found in
    • Form Configuration » Tab: Advanced

      Group: CSV Export

  • Even unpublished fields can be enabled for CSV export at the form level.
    • Field Configuration » Tab: Advanced

      Group: CSV Export » Parameter: Published Fields Only = “Yes”.

  • At the field level, all settings for this can be found in
    • Field Configuration » Tab: Data Usage in the Frontend

      Group: CSV Export Settings