Cleaning up form's submissions log


#1

Matrix Version: v5.3.4.0

Hi all,

What’s the best way to clean up form submissions log. I have a form with about 1700 submissions and would like to delete all the submissions. I tried to delete from admin interface in the batch of 300, it timed out. Tried batch of 50, timed out. Tried batch of 10, took long time but was successful. But obviously it will take forever to do it in batch of 10.

Any suggestion? Thanks.

EDIT: I updated the title. For some reason it showed incorrect title.


(Evan Wills) #2

We had a similar issue after one of our forms got pounded on by a SPAM bot. In the end I had to get Squiz Support to do it for me. (I think we had 150k of submissions)


(Tbaatar) #3

If you are self hosted and have in-house Server Administrator you can easily mass delete by following this guide:

https://matrix.squiz.net/manuals/server-administrator/chapters/remove-assets-scripts#remove_form_submission.php

Otherwise your only option is Squiz Support.

If logging submissions is not important you can turn it off.


(Evan Wills) #4

@tbaatar Thanks for that. Unfortunately, our SLA with Squiz prevents us from doing that sort of server admin. I will discuss turning it off for logging for some of our forms.

It would be super useful to be able to set an automatic expire time for submissions. e.g. delete submissions after one year.


(Bart Banda) #5

Yea the deletion of form submissions should ideally be handled by the HIPO, so that it doesn’t time out, will add that to our backlog to look at.

The expiry setting is also a good idea, will look into that as a new feature.

In the meantime, yes, using that script is the best way, but also if you want to have automatic expiry (deletion), I’d suggest setting up a trigger that creates a future link to the trash when a new form submission asset is created.