Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Yakforms Yakforms
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • YakformsYakforms
  • YakformsYakforms
  • Wiki
  • Expiration of webforms

Expiration of webforms · Changes

Page history
From Framaforms to Yakforms authored May 11, 2021 by theo lem's avatar theo lem
Hide whitespace changes
Inline Side-by-side
Expiration-of-webforms.md
View page @ 66e7c3b7
Framaforms implements automatic webforms and submissions deletion after 6 months in the PostgreSQL database if no user action is undertaken.
Yakforms implements automatic webforms and submissions deletion after 6 months in the PostgreSQL database if no user action is undertaken.
## TIMELINE
![framaforms_lifetime_timeline](uploads/9c58483e9bab986776f6ecaf146a47d2/framaforms_lifetime_timeline.png)
# Timeline
![yakforms_lifetime_timeline](uploads/9c58483e9bab986776f6ecaf146a47d2/yakforms_lifetime_timeline.png)
## PROCESS
* each day, the Drupal automated cron checks in the DB for rows aged over 6 months, minus two weeks (24 weeks). It will place their nid in a new row of the `framaforms_expired` table.
* Framaforms will get the corresponding user emails and notify them of their webform expiration, giving them the possibility to change the expiration date (always with a maximum of 6 months in the future). If the email was sent, the `notified` column in the `framaforms_expired` table will be set to 1.
* Framaforms will also check for webforms having reached their deletion date (35 weeks), whose owner was notified, but did nothing. In which case, the webform will be deleted, as well as the entry in the `framaforms_expired` table.
## Process
* each day, the Drupal automated cron checks in the DB for rows aged over 6 months, minus two weeks (24 weeks). It will place their nid in a new row of the `yakforms_expired` table.
* Yakforms will fetch the corresponding user emails and notify them of their webform expiration, giving them the possibility to change the expiration date (always with a maximum of 6 months in the future). If the email was sent, the `notified` column in the `yakforms_expired` table will be set to 1.
* Yakforms will also check for webforms having reached their deletion date, whose owner was notified, but did nothing. In which case, the webform will be deleted, as well as the entry in the `yakforms_expired` table.
## COSTUMIZING EXPIRATION DELAYS
:construction: this part of the doc is out of date :construction:
## Customizing automatic expiration periods
The following variables can be modified at the top of `framaforms_cron()` in order to change the expiration delays :
* `notification_period` : amount of time between the notification of the user and the actual expiration of the webform. This is set by default to *two weeks*, but you can set it to `1 month`, `3 weeks`, `1 day`, etc, following php relative time formats (https://www.php.net/manual/en/datetime.formats.relative.php).
* `deletion_period` : amount of time between the notification of the user and the actual deletion of data from the database. This is set by default to `9 weeks` (approx. 2 months).
* `cron_frequency` : amount of time between two cron runs. The module will check at each call to Drupal cron when `framaforms_cron()` was last run. `-1 day` means that "framaforms_cron should be run only if the last run is older that 1 day". You can also set it to `-1 week`, `-2 days`, `-2 months`, to your liking, but don't forget the `-` sign.
Both of these periods of time can be modified, so Yakforms feet your needs :
* the **expiration period** : this is the amount of time between the form creation and its expiration. This is a maximum value : the user will be able to set their form expiration date before this period of time in the future if they wish to (for short-lived forms), but not after. Default is 26 weeks (6 months).
* the **deletion period** : this is the amount of time between the moment the form expires and when it is deleted from the website. During that period of time, the author will be able to access the form's results, but the form will be _unpublished_, meaning the form is not accessible publicly. If the form's author modifies the form's expiration date during that time, the form will be republished. Default is 9 weeks (2 months).
**If you do not wish to implement automatic webform deletion in your Framaforms instance** (meaning all webforms and submissions will live forever in your database), you can simply browse to `yoururl.ex/admin/config/system/framaforms` and set the expiration period to 0. Forms won't be deleted after that.
**If you do not wish to implement automatic webform deletion in your Yakforms instance** (meaning all webforms and submissions will live forever in your database), you can simply browse to `yoururl.ex/admin/config/system/yakforms` and set the expiration period to 0. Forms won't be deleted after that.
**If you want to deactivate the expiration of webforms altogether** (meaning forms will stay published even after the expiration date), simply browse to `yoururl.ex/admin/config/workflow/rules/reaction/manage/rules_expiration_form1_expired` and delete the "Unpublish content" action. Forms won't ever expire after that.
**If you want to deactivate the expiration of webforms altogether** (meaning forms will stay published even after the expiration date), simply browse to `yoururl.ex/admin/config/workflow/rules/reaction/manage/rules_expiration_form1_expired` and delete the "Unpublish content" action. Forms won't ever expire after that.
This is **not recommanded** if your instance is used intensively : your database will grow forever and a lot of this data can be useless.
\ No newline at end of file
This is **not recommanded** if your instance is used intensively : your database will grow forever and a lot of this data can be useless. Allowing a form to run for 6 months and then fade away if the user did not take any action fits 95% of the cases.
Clone repository
  • Changing an instance language
  • Common issues
  • Configuring Yakforms
  • Custom scripts
  • Enhancing Yakforms
  • Expiration of webforms
  • From Framaforms to Yakforms
  • Installing Yakforms through the installation profile
  • Module : yakforms
  • Module : yakforms_public_results
  • Module : yakforms_share_results
  • Module : yakforms_spam
  • Produce a release
  • Translating Yakforms
  • Working with the Yakforms feature
View All Pages