Save & Edit
Adds a "Save & Edit" button to node edit forms that saves content while keeping users on the edit page.
save_edit
Install
composer require 'drupal/save_edit:^2.1'
composer require 'drupal/save_edit:8.x-1.9'
Overview
The Save & Edit module enhances the Drupal content editing workflow by adding a "Save & Edit" button to node edit forms. Unlike the standard "Save" button which redirects users to the node view page after saving, the "Save & Edit" button saves all content changes while keeping the user on the edit form.
This functionality is particularly useful for content editors who frequently save their work as drafts while continuing to make changes. It eliminates the need to navigate back to the edit form after each save, streamlining the content creation process.
The module offers extensive configuration options including customizable button text, positioning controls, integration with the Gin admin theme, automatic unpublish functionality, and the ability to hide other default form buttons. Administrators can enable the button on a per-content-type basis, giving fine-grained control over where the feature is available.
Features
- Adds a configurable "Save & Edit" button to node edit forms that saves content while keeping users on the edit page
- Customizable button text for both the Save & Edit button and the default Save button
- Adjustable button weight/positioning within the form actions area (range -10 to 10)
- Integration with Gin Admin theme to display button as primary action instead of in dropdown
- Auto-unpublish feature that automatically sets nodes to unpublished when using Save & Edit
- Option to auto-unpublish only new nodes, leaving existing nodes' publish status unchanged
- Hide default form buttons individually: Save, Publish, Preview, and Delete
- Automatic content type enablement option for newly created content types
- Per-content-type configuration to control which node types display the Save & Edit button
- Preserves destination parameter when redirecting back to edit form
- Automatic cleanup of configuration when content types are deleted
Use Cases
Long-form Content Creation
Content editors working on lengthy articles or documentation can use Save & Edit to periodically save their progress without interruption. Instead of being redirected to the published page after each save, they remain on the edit form and can continue writing immediately.
Draft Workflow with Auto-Unpublish
Organizations requiring content review before publication can enable the auto-unpublish feature. When editors use Save & Edit, content is automatically saved as unpublished, ensuring nothing goes live without proper review. The 'new nodes only' option allows this workflow for initial creation while preserving publish status during edits.
Streamlined Editorial Interface
For sites where content editors primarily use Save & Edit, administrators can hide the standard Save button to simplify the interface. Combined with hiding Preview and Delete buttons, this creates a focused editing experience with only the essential Save & Edit action visible.
Gin Theme Integration
Sites using the Gin admin theme can display the Save & Edit button as a prominent primary action in the sticky header area, rather than buried in the 'More Actions' dropdown. This provides quick access to the most-used save functionality.
Multi-step Content Building
When creating complex content with multiple fields, media uploads, or related entities, editors can save incrementally using Save & Edit. This protects against data loss and allows for file uploads or AJAX operations that require saved content.
Training New Content Editors
The customizable button text feature allows changing 'Save & Edit' to more intuitive labels like 'Save Draft' or 'Continue Editing' based on organizational terminology, reducing confusion for new team members.
Tips
- Grant the 'Use Save and Edit Button' permission to appropriate roles (editors, content creators) in Administration > People > Permissions
- For Gin theme users, enable the 'Display as Gin Admin theme primary actions' option to make the button more prominent
- Use the auto-unpublish feature with caution on production sites; consider using 'new nodes only' to avoid accidentally unpublishing existing content
- Set button weight to -10 to position Save & Edit as the first button, or higher values to position it after other actions
- When hiding the default Save button, ensure users understand they should use Save & Edit, or provide the Publish button as an alternative for final saves
- Enable 'Enable node types automatically' if you frequently create new content types and want Save & Edit available by default
- The module preserves any 'destination' query parameter, so Save & Edit works correctly when accessed via contextual links or other navigation paths
Technical Details
Admin Pages 1
/admin/config/save_edit/settings
Main configuration page for the Save & Edit module. Allows administrators to customize button behavior, appearance, and select which content types should display the Save & Edit button.
Permissions 2
Hooks 4
hook_help
Provides help text for the module on the help page
hook_form_alter
Core functionality hook that adds the Save & Edit button to node forms. Checks user permissions, validates content type is enabled, clones submit button configuration, adds custom submit handlers, handles Gin theme integration, and manages button visibility.
hook_entity_bundle_create
Automatically adds newly created content types to the module configuration. If 'Enable node types automatically' is checked, the new type is also enabled; otherwise it's added but disabled.
hook_entity_bundle_delete
Automatically removes deleted content types from the module configuration to prevent orphaned configuration entries.
Troubleshooting 6
Verify that: 1) The user has the 'Use Save and Edit Button' permission, 2) The content type is enabled in the Save & Edit settings at /admin/config/save_edit/settings, 3) Clear the Drupal cache after configuration changes.
Adjust the 'Save & Edit Button Weight' setting. Use negative values (-10 to -1) to move the button left/earlier, or positive values (1 to 10) to move it right/later.
Ensure the 'Display as Gin Admin theme primary actions' checkbox is enabled in settings. This option only appears when Gin is detected as the admin theme.
Check if 'Auto Unpublish All Nodes' is enabled. If you only want this behavior for new content, enable 'Auto Unpublish on New Nodes Only' instead.
Review the button visibility settings. The 'Hide default...' checkboxes control which standard buttons are shown.
Either manually enable them in settings, or enable 'Enable node types automatically' to have new content types added and enabled by default.
Security Notes 4
- The module respects Drupal's permission system - only users with 'use save and edit' permission see the button
- Administrative settings require the separate 'administer save and edit' permission
- The module does not introduce any new data input or storage, only modifies form behavior
- Auto-unpublish features should be used carefully to avoid unintended content visibility changes