Optimizely Forms is only supported by MVC-based websites and HTML5-compliant browsers.
Editors can set a retention policy in the user interface, that is, control how long finalized form submissions and partially submitted form data should be stored.
## Use Actor to change expired date of submission
By default, the retention policy of a form applies to all its submissions. It is possible to write a custom actor to change the date for a specific submission. In this example, we create a custom actor to check if a submission comes from an internal or external visitor. If it comes from an internal user, the expired date is set to the previous day so the submission is deleted right after the Submission Cleanup scheduled job is run.
Create a class that implements the `
PostSubmissionActorBase` and `
Implement the class as below:
ExpiredDate` should be stored as UTC time format, otherwise it may cause some unexpected issues.
## Change default value of retention policies
Optimizely Forms uses `
SubmissionRetentionService` to get the default value for the retention periods of partial and finalized submissions. You can inherit that class and override the method to get a custom default value for the retention periods for submissions. Example:
Then you need to go to `
DependencyResolverInitialization` to register that service: