PHPackages                             plasticstudio/form-submission-cleanup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. plasticstudio/form-submission-cleanup

ActiveSilverstripe-vendormodule[Queues &amp; Workers](/categories/queues)

plasticstudio/form-submission-cleanup
=====================================

Configurable queued-job cleanup for SilverStripe form submission DataObjects.

1.0.0(1mo ago)090↓40%BSD-3-ClausePHP

Since Jun 3Pushed 1mo agoCompare

[ Source](https://github.com/PlasticStudio/form-submission-cleanup)[ Packagist](https://packagist.org/packages/plasticstudio/form-submission-cleanup)[ RSS](/packages/plasticstudio-form-submission-cleanup/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

Form Submission Cleanup
=======================

[](#form-submission-cleanup)

A Silverstripe module that provides a single queued job to delete old form submission DataObjects on a daily schedule. Target classes, retention periods, and exclude rules are all defined in YAML config.

Requirements
------------

[](#requirements)

- silverstripe/framework ^6
- symbiote/silverstripe-queuedjobs ^6.2
- silverstripe/userforms ^7 *(optional — only required if targeting `SubmittedForm` records)*

Installation
------------

[](#installation)

```
composer require plasticstudio/form-submission-cleanup
```

Setup a cron job:

```
*/1 * * * * /path/to/silverstripe/vendor/bin/sake tasks:ProcessJobQueueTask
```

Configuration
-------------

[](#configuration)

Copy the relevant blocks into your project's `_config/config.yml`.

### Globals

[](#globals)

```
PlasticStudio\FormSubmissionCleanup\Jobs\FormSubmissionCleanupJob:
  default_retention_days: 365  # applied to any target without its own retention_days
  default_date_field: Created  # field used to determine record age
```

### Targets

[](#targets)

Add one entry per DataObject class to clean up. UserForms is shown as an example; omit it if the module is not installed.

```
PlasticStudio\FormSubmissionCleanup\Jobs\FormSubmissionCleanupJob:
  targets:
    'SilverStripe\UserForms\Model\Submission\SubmittedForm':
      retention_days: 365       # optional — overrides default_retention_days
      date_field: Created       # optional — overrides default_date_field
      exclude:                  # optional — ORM exclude filter (same syntax as DataList::exclude)
        IsArchived: true

    'App\Model\AnotherSubmission':
      retention_days: 90
```

**Per-target options**

KeyTypeDescription`retention_days`intOverrides the global default for this class only`date_field`stringDataObject field to measure age against (default `Created`)`exclude`mapORM filter passed to `DataList::exclude()` — matching records are kept### Daily scheduling (default jobs)

[](#daily-scheduling-default-jobs)

Register the job as a [QueuedJobs default job](https://docs.silverstripe.org/en/6/optional_features/queuedjobs/default-jobs/) so it is automatically re-queued after each run.

```
SilverStripe\Core\Injector\Injector:
  Symbiote\QueuedJobs\Services\QueuedJobService:
    properties:
      defaultJobs:
        FormSubmissionCleanup:
          type: 'PlasticStudio\FormSubmissionCleanup\Jobs\FormSubmissionCleanupJob'
          filter:
            JobTitle: 'Form Submission Cleanup'
          recreate: 1
          startDateFormat: 'Y-m-d H:i:s'
          startTimeString: 'tomorrow 02:00'
```

Run a `dev/build`, then queue the first instance manually via the CMS (Admin &gt; Jobs). Subsequent runs are scheduled automatically.

How it works
------------

[](#how-it-works)

1. `setup()` iterates every configured target class, applies the retention cutoff and any exclude filter, and collects matching record IDs.
2. `process()` deletes one record per step. Cascade-delete rules on each DataObject handle any related records (e.g. `SubmittedFormField` children on `SubmittedForm`).
3. After the job completes, the default jobs feature re-queues it for the next scheduled run.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

52d ago

Major Versions

1.0.0 → 6.x-dev2026-06-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4179876?v=4)[PS/digital](/maintainers/plasticstudio)[@PlasticStudio](https://github.com/PlasticStudio)

---

Top Contributors

[![brad-ps](https://avatars.githubusercontent.com/u/107819630?v=4)](https://github.com/brad-ps "brad-ps (9 commits)")[![josephlewisnz](https://avatars.githubusercontent.com/u/57464168?v=4)](https://github.com/josephlewisnz "josephlewisnz (2 commits)")[![Liam-Bullock](https://avatars.githubusercontent.com/u/101078889?v=4)](https://github.com/Liam-Bullock "Liam-Bullock (1 commits)")

---

Tags

silverstripecms

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/plasticstudio-form-submission-cleanup/health.svg)

```
[![Health](https://phpackages.com/badges/plasticstudio-form-submission-cleanup/health.svg)](https://phpackages.com/packages/plasticstudio-form-submission-cleanup)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[symbiote/silverstripe-queuedjobs

A framework for defining and running background jobs in a queued manner

55894.5k105](/packages/symbiote-silverstripe-queuedjobs)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1101.1M315](/packages/dnadesign-silverstripe-elemental)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
