Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.5 Update released for Drupal core (11.4.5)! Release: Drupal 10.6.15 Update released for Drupal core (10.6.15)! Release: Superfish Dropdown Menu 8.x-1.15 Minor update available for module superfish (8.x-1.15). Release: Leaflet 10.4.10 Minor update available for module leaflet (10.4.10). Release: Raven: Sentry Integration 7.5.1 Minor update available for module raven (7.5.1). Release: htmLawed 8.x-3.8 Minor update available for module htmlawed (8.x-3.8). Release: Raven: Sentry Integration 7.5.0 Minor update available for module raven (7.5.0). Module Revived: Media Library Form API Element 2.1.5 Module media_library_form_element updated after 10 months of inactivity (2.1.5). Release: Acquia Content Optimization 2.1.0-alpha1 First alpha version released for module conductor (2.1.0-alpha1). Usage Milestone: Manage display Module manage_display crossed 1,000 active installs.

Autosave Form

17,120 sites Security covered
View on drupal.org

This module provides an autosave feature for forms, automatically saving your progress periodically. When you return to a form with an autosaved state, you'll be prompted to resume editing or discard the saved changes. You can configure the autosave interval and which types of forms it applies to.

The "Autosave Form" module provides an autosave feature for all forms (entity forms inclusive). Drupal Core >= 8.3.x is required.

Currently the autosave submit will be triggered every 60 seconds, but this approach might be exchanged later through a solution listening for DOM changes.

The autosave form module comes with a configuration form, which could be found under Admin->Configuration->Content->Autosave Form. There the interval could be easily adjusted and decide whether autosave is turned on for content or config entity forms or for both. By default it is active only on content entity forms and currently it is being tested only with content entity forms. If support for config entity forms is required please feel free to open an issue if you find some bugs regarding config entity forms.

At the moment the autosave works only for entity forms, but it will be extended to cover regular forms as well.

As there is no conflict management solution implemented yet, the autosaved states for an entity will be purged when the entity is saved - as soon as the conflict management solution is present this behavior will be changed. If a user is currently editing an entity form and it is already cached by e.g. ajax call for adding a new item to a multiple field, and it is being saved by another user, then an alert message will be shown indicating that the autosave has been turned off, because the entity has been saved elsewhere.

When the user opens a form, she was previously editing and an autosaved state is present she will see a message indicating that there is an autosaved state and will be offered the ability to resume the editing or discard the autosaved states. A third option "view differences" will be implemented later.

The module works out of the box for normal content entity forms, but if you have nested entity reference inline forms then you would require entity deep serialization. For that please take a look at the following Drupal Core issues
#2824097: Deep serialization for content entities to make an exact snapshot of an entity object's structure based on its current state
and
#2844229: [PP-1] Serializing content entity form objects should deeply serialize the entity in case of nested/inline entity forms.

Storage:
The autosave_form module does not use revisions for the autosave_states, but has its own storage. Some of the reasons for not using revisions are

  • There are technical limitations such as NOT NULL constraints in the database.
  • Saving to entity tables is slower than saving to a dedicated storage.
  • The autosave states aren't really revisions, but only intermediate states for the entity of the current user. Eventually the user might end up disregarding all of the autosave states.

Activity

Tracked releases
4
Tracked since
Jan 2025
Latest release
4 months ago
Releases (12 mo)
1 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Release date
8.x-1.11 Stable Mar 31, 2026
8.x-1.10 Stable Feb 3, 2025
8.x-1.9 Stable Jan 17, 2025
8.x-1.8 Stable Jan 15, 2025