Form change warning
No security coverage
You can display the "You have unsaved changes" warning on a form when any input has been changed.
Just attach the defined library to your form.
/**
* Implements hook_form_alter().
*/
function YOURMODULE_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['#attached']['library'][] = 'form_change_warning/form_change_warning';
}
Similar modules
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha1 | Pre-release | Jan 10, 2025 | |||
| 1.0.x-dev | Dev | Jan 10, 2025 |