Warn user that form has changes when a checkbox is changed

Created on 19 December 2012, about 12 years ago
Updated 18 December 2023, about 1 year ago

Problem/Motivation

This issue applies to locale.admin.js in the locale module directory and to tabledrag.js in the misc directory (and possibly other components). The issue described is minor, but at least worth noting in case it can be bundled with higher priority items.

Problem/Motivation

A common usability problem is partially solved:

  1. Users may mistakenly navigate away from a page without saving changes.
  2. When users change the order of a draggable table, they are reminded by messages from (at least 2) core components to save a form they have re-ordered.
  3. However, users are not reminded if they change the state of a checkbox.
  4. Of course, users are also not reminded when they make changes on non-tableDrag forms; for starters perhaps we shoot for consistent warnings on the form that already partially provides them?

Steps to reproduce

Edit the Administration menu (navigate to example.com/admin/structure/menu/manage/admin). First uncheck a checkbox; no message will appear. Then change the order of a menu item; a message is triggered reading "Changes made in this table will not be saved until the form is submitted."

Proposed resolution

Remaining tasks

Patch
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
FormΒ  β†’

Last updated 21 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States kay_v

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡­Philippines abhaypai

    Jumped in this issue from Bus Smash Initiative

    Still replicating in D11.

    Can we add a new js file naming checkbixunsaved.js, which will detect that if checkboxes are updated in a page or not ?
    With this approach i believe we can detect and show consistent behaviour at least for this page.

    Behavior can be defined as:

    1. Observe if checkboxes are available in a page.
    2. Keep the statuses in cached array as per element id, only on status change by user
    3. Add or remove it from array, based on changes made by user
    4. And then we can show message based on above user behavior
Production build 0.71.5 2024