Delete Data Automatically

Automatically delete saved data

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

Visforms allows you to save the input that the user has made in the form. The Visforms Subscription adds two plugins to your Visforms installation. Working together, these two plugins make it possible to automatically delete these saved user entries after a self-determined period of time.

You have the following setting options with regard to the automatic deletion of data:

  • All settings are made for each individual form.
  • Automatically delete records older than a number of days you specify.
  • You can choose to only delete records that have the status “hidden” (unpublished).
  • You can choose whether files that the user submitted with the record are also automatically deleted.
  • You can specify whether a log entry should be written for the deletion process.

Note: A maximum of one deletion run is carried out per day.

Auto delete options

Auto delete data

All settings are made for each individual form

This enables you, for example, to automatically delete expired data records for one form. The saved data of another form are not affected and are not touched by the deletion process.

The Schedule

With the option “Period of time (days)” you specify a number of days after which the saved data records “expire”. Expired data records are then automatically deleted during the next delete run. If the data for a selected form should not be automatically deleted, then set this option to the value 0.

Delete only records that have the status “hidden” (unpublished).

The auto-delete saved data feature really does automatically delete all expired records. Without further enquiry. Without backup. That’s the point of the feature. If you have not finished processing an inquiry by this time, the data will still be deleted.

Use the “Only unpublished” option to exclude certain records from being deleted. These can be data records that you have not yet finished processing. To do this, set all uncompleted data records to “published” and the option “Only unpublished” to “yes”. For the “Only unpublished” option, “yes” is the default setting.

Visforms also offers you the option of setting all transmitted data records to “published” by default. Once a data record has been processed, you can set it to “hidden”. Only then is the data record included in the automatic deletion.

Also delete files that the user submitted with the record

Suppose you have fields of type “File Upload” in your form. You can then use this option to also automatically delete the files that the user submitted with the record.

Write a log file for the deletion process

If you activate this option, Visforms creates a log file. It can be used to log all deletion processes. A separate log file is written for each form for which the option is activated. It notes the time, action (delete record/delete file) and record ID/filename for deleted records/files.

The log file has the template name form_ID.php. In the final file name, instead of the word ID, there is the number of the form ID, e.g. form_1.php.

The log file is in the visforms-datalogs subdirectory. This subdirectory is created directly under the Joomla log directory. You define the Joomla log directory in the Joomla configuration of your website. Default for the Joomla log directory is administrator/logs.

Enable automatic deletion of saved data

If you want to use this feature, you must have both

  • the plugin “Visforms - delete data automatically” as well
  • activate the plugin “System - Clear Visforms data” in the plugin manager.

First activate the plugin “Visforms - Delete data automatically”.

First activate the plugin “Visforms - Delete data automatically”. An additional tab “Delete data automatically” is then displayed in the Visforms administration in the form configuration. Make the desired settings here for each form whose saved data you want to automatically delete according to a schedule.

Then activate the “System - Delete Visforms data” plugin

Then activate the “System - Delete Visforms data” plugin. The first delete run is now carried out immediately and the delete run timer is set for the first time.

The timer is set to 0:00 the following day. All further extinguishing runs then take place daily shortly after midnight. Because after an erasure run has taken place, Visforms sets the timer for the next erasure run to 0:00 a.m. of the following day.

Note: The deletion always takes place at a time when your website is probably not being frequented as much.

You should note that

The feature “automatically delete saved data” really deletes all expired records irrevocably. Without further enquiry. Without backup. That’s the point of the feature. So please think carefully about how you configure the mechanism.

Note: Create backups before testing the feature.

Conserve resources

We have tried to optimize the process of automatic deletion as much as possible. Nevertheless, this process can be relatively computing-time intensive with a large number of forms and a large number of data records.

It has to be checked once a day for all data records whether data needs to be deleted. This check runs even if you have deactivated the options in all forms. You deactivate the option by setting the time span to 0. If you don’t want to delete any data automatically, you should deactivate the “System - Delete Visforms data” plugin in the plugin manager.

Note: This can potentially save you a lot of resources.