2020-10-30 14:08:56 -04:00
---
stage: none
group: unassigned
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-30 14:08:56 -04:00
---
2018-10-15 09:36:19 -04:00
# Dirty Submit
2020-02-06 10:09:11 -05:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/21115) in GitLab 11.3.
2018-10-15 09:36:19 -04:00
## Summary
Prevent submitting forms with no changes.
Currently handles `input` , `textarea` and `select` elements.
2021-06-08 14:10:23 -04:00
Also, see [the code ](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/dirty_submit/ )
2019-08-19 19:41:23 -04:00
within the GitLab project.
2018-10-15 09:36:19 -04:00
## Usage
2020-05-19 14:08:11 -04:00
```javascript
2018-10-15 09:36:19 -04:00
import dirtySubmitFactory from './dirty_submit/dirty_submit_form';
new DirtySubmitForm(document.querySelector('form'));
// or
new DirtySubmitForm(document.querySelectorAll('form'));
```