Mike Barton - Projects

Form Data Manager

This Modx extra is a Custom Manager Page (CMP) that can be used to define layouts for viewing and exporting data created from forms. Currently, this works with form data generated via the Formz extra, FormIt saved forms (using the FormItSaveForm hook) or Custom Tables.


The front page lists the forms that exist in the site. By selecting the form you can define a layout to suit your processing requirements.

NOTE: New from version 1.3+ an extra tab has been added so that you can create templates for the data view / export.
This is a useful facility if you wish to export multiple forms in a standard format. The option is provided when defining a layout for
a form (or table) to use a defined template, you then need to map the fields from the form/table to the predefined ones in the template.

When setting up the template you enter comma separated column names, fields types (text/number/date), default values & an optional field
name that contains a date that can be used for the selection range when exporting.

It is now also possible to mark formz/formit forms as inactive so as to reduce the number appearing in each tab.

Once the output definition has been created you can view the existing records and then choose to export the data.
When defining the layout you can select which fields are to be included, change the sequence/order of the fields,
set alternative column titles and if needed set a default value to be used if the value of a field is empty.

The export file will match the defined layout including any required default values irrespective of the form fields saved.

NOTE: New from version 1.3+ you can set an output function to format the data in the column of the view / export, e.g. ShowAsUpper.

Optionally, you can specify a date range for the export. By default the Start Date will be set to the last exported End Date i.e. just
the latest data.

If you change the structure of a form you will need to remove the existing layout and then define a new form layout.
Note - please ensure you have exported any existing form data that you may need using the existing layout before removing
and defining a new layout.


MODX Package Management - http://modx.com/extras/package/FormDataManager

Following installation, a new manager menu option will appear in the Extras menu.



This project is maintained at https://github.com/mjb123uk/FormDataManager

Credit to the developers of Formz & Formit some code extracts/ideas used in this Extra.


Additional help / Useful Images

Click link for further help and annotated screenshots - FormDataManager/Help 


Mike Barton (2019)