PHPackages                             dynasource/js-submitonce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. dynasource/js-submitonce

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

dynasource/js-submitonce
========================

Protects forms to be submitted twice

0.1(9y ago)015BSD-3-Clause

Since May 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dynasource/js-submitonce)[ Packagist](https://packagist.org/packages/dynasource/js-submitonce)[ Docs](http://www.dynasource.eu/)[ RSS](/packages/dynasource-js-submitonce/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Vanilla JS form submit once protection
--------------------------------------

[](#vanilla-js-form-submit-once-protection)

Forms usually need to be submitted once.

When double submission does occur (i.e. because of double clicking), unwanted side effect can occur:

- duplication of records in a database
- multiple actions such as i.e. sending duplicate emails
- thrown exceptions as systems could not expect certain actions to be executed twice

This "Js-SubmitOnce" script is a plain JS vanilla script to prevent this undesired behavior.

Installation
------------

[](#installation)

Installation is done by composer, requiring:

```
{
  "require": {
   "dynasource/js-submitonce" : "*"
  }
}
```

Include it in your webpage with:

```
window.addEventListener('load', function () {
    new SubmitOnce({
        'selector': 'btn'
    });
});
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3289d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13b1a400040f99ec0d7b05424d49b3d5b0cad1696ab1637deb46b3a5c7ac0b3d?d=identicon)[dynasource](/maintainers/dynasource)

---

Top Contributors

[![dynasource](https://avatars.githubusercontent.com/u/125726?v=4)](https://github.com/dynasource "dynasource (6 commits)")

---

Tags

JSFormsvanilla

### Embed Badge

![Health badge](/badges/dynasource-js-submitonce/health.svg)

```
[![Health](https://phpackages.com/badges/dynasource-js-submitonce/health.svg)](https://phpackages.com/packages/dynasource-js-submitonce)
```

###  Alternatives

[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[uestla/recaptcha-control

reCAPTCHA control for Nette Framework forms

26572.0k1](/packages/uestla-recaptcha-control)[pear/html_quickform2

Provides methods to create, validate and render HTML forms in PHP.

24498.9k2](/packages/pear-html-quickform2)[sheadawson/silverstripe-zenvalidator

Faster, easier client and server-side form validation for SilverStripe

5778.4k2](/packages/sheadawson-silverstripe-zenvalidator)[aryehraber/statamic-captcha

Protect your Statamic forms using a Captcha service

16194.4k](/packages/aryehraber-statamic-captcha)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
