# dom-form-submit

> Utility to create/submit form

Latest version **0.0.7** (published 2018-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install dom-form-submit
pnpm add dom-form-submit
yarn add dom-form-submit
bun add dom-form-submit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-01-24 |
| First published | 2017-12-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hasnat Ullah |
| Maintainers | hasnat |
| Keywords | form, submit, data, post, create, input, submit, submit-form, form, fill |

## Links

- npm: https://www.npmjs.com/package/dom-form-submit
- Repository: https://github.com/hasnat/dom-form-submit
- Homepage: https://github.com/hasnat/dom-form-submit#readme
- Issues: https://github.com/hasnat/dom-form-submit/issues
- npm.io page: https://npm.io/package/dom-form-submit

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2018-01-24
- 0.0.6 — 2017-12-29
- 0.0.5 — 2017-12-21
- 0.0.4 — 2017-12-21
- 0.0.3 — 2017-12-21
- 0.0.2 — 2017-12-21
- 0.0.1 — 2017-12-21

## README

# DOM-Form-Submit
Utility build or use form and submit using provided data.
This library will intelligently reuse the same form and perform minimal manipulations for optimum performance.

[![Build Status](https://travis-ci.org/hasnat/dom-form-submit.svg)](https://travis-ci.org/hasnat/dom-form-submit)

[![NPM](https://nodei.co/npm/dom-form-submit.png)](https://nodei.co/npm/dom-form-submit/)

# Installation

#### Npm
```console
npm install dom-form-submit
```

# Example

```javascript
var submit = require('dom-form-submit');

// Submit form with data (create or use existing form) with callback to run after submit
submit(
    {a: 'b', c: 'd'},
    {id: 'my-form-id', name: 'my-form-name'},
    function(submittedForm) {}      // callback with form element
);

// Submit an existing form.
submit({a: 'b', c: 'd'}, {
    method: 'POST',
    form: document.getElementById('my-form')
});

// Basically empty form submit
submit();

```

# API Options / Defaults.

```javascript
{
    method: 'GET',
    enctype: 'application/x-www-form-urlencoded',
    target: '_self'
}
```

Please feel free to create a PR!

### Thanks to

https://github.com/gillstrom/submitform

https://github.com/DylanPiercey/submit-form

---
_Source: https://npm.io/package/dom-form-submit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
