Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

submit_indicator

1 sites No security coverage
View on drupal.org

Adds AJAX-like loading animations to non-AJAX form buttons

AJAX forms in Drupal display loading indicators (spinners or throbbers) when submitted. This module provides the same functionality for regular form submissions - showing visual feedback during server-side processing and preventing double-submission issues.

The module supports three indicator types:

  1. A css spinner background-image on the button
  2. Drupal's standard AJAX throbber
  3. Drupal's AJAX fullscreen throbber

Configuration

  1. Install and enable the module
  2. Visit Admin / Config / User Interface / Submit Indicator
  3. Choose your default indicator style (spinner, throbber, or fullscreen)
  4. Done - all forms now show feedback on submit

You can also target specific form buttons.

For detailed configuration options, see the README.md.

Features

  • Three indicator types: Spinner overlay on button, Drupal's throbber next to button, or fullscreen overlay
  • Automatic or opt-in: Enable for all forms by default, or only specific forms
  • Form API property: Use #submit_indicator for per-form and per-button control (similar to #ajax)
  • Smart exclusions: Automatically skips AJAX forms, optionally excludes admin pages or specific form IDs
  • CSS customizable: Theme the spinner color and appearance via CSS custom properties

How It Works

When a user clicks a submit button on a non-AJAX form:

  1. The configured indicator (spinner, throbber, or fullscreen) is shown
  2. The button is optionally disabled to prevent double-clicks
  3. If client-side validation fails, the indicator resets immediately
  4. If the form submits successfully, the page navigates and the indicator disappears
  5. A configurable timeout resets the indicator if the page doesn't navigate (handles errors)

Usage: #submit_indicator Property

// Use fullscreen overlay for a form
$form['#submit_indicator'] = ['type' => 'fullscreen'];

// Shorthand - just pass the type
$form['#submit_indicator'] = 'throbber';

// Disable for a specific button
$form['actions']['preview']['#submit_indicator'] = FALSE;

// Disable for entire form
$form['#submit_indicator'] = FALSE;

// Spinner with custom color
$form['actions']['submit']['#submit_indicator'] = [
  'type' => 'spinner',
  'color' => '#000000',
];

Available Options

  • type - 'spinner', 'throbber', or 'fullscreen'
  • color - Hex color for spinner (spinner type only)
  • message - Text shown next to throbber (throbber type only)
  • disableButton - Whether to disable the button (default: true)

Similar Modules

Requirements

  • Drupal 10 or 11

Activity

Total releases
1
First release
Jan 2026
Latest release
3 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Jan 18, 2026