0.8.0 • Published 4 years ago

form-wrapper-js v0.8.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

A lightweight library that creates forms systems in a convenient and easy way, without dependencies and magic code.

Status: BETA

The current version is in beta, most of the feature are stable, but there are may still be bugs, and api may change a little bit.

for 0.x move to 0.x branch.

:art: Playground

:cd: Installation

npm install --save form-wrapper-js@next  # for 1.x
// or
npm install --save form-wrapper-js  # for 0.x

or

yarn add form-wrapper-js@next  # for 1.x
// or
yarn add form-wrapper-js  # for 0.x

:book: Documentation

Please check out the Form Wrapper JS website.

:rocket: Basic Usage

This is a quick example with VUE, please check out the website for full documentation.

<template>
  <form @submit.prevent="submit">
    <input type="text" v-model="form.email" />
    <input type="text" v-model="form.name" />
    <input type="text" v-model="form.password" />

    <button type="submit" :disabled="form.$submitting" />
  </form>
</template>

<script>
import { Form } from 'form-wrapper-js'
import axios from 'axios'

export default {
  data() {
    return {
      form: Form.create({
        email: null,
        name: null,
        password: null,
      }),
    }
  },
  methods: {
    async submit() {
      const { response } = await this.form.$submit(form =>
        axios.post('some-url', form.$values())
      )
    },
  },
}
</script>

:beers: Contribute

Code, Docs, Bug reports, Ideas - are more the welcome.

the installation is very easy, take a look at CONTRIBUTING.md file and follow the instructions.

:lock: License

The MIT License (MIT). Please see License File for more information.

Index

Classes


1.0.0-beta.6

4 years ago

1.0.0-beta.5

5 years ago

1.0.0-beta.4

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.2

5 years ago

1.0.0-beta.1

5 years ago

1.0.0-beta.0

5 years ago

0.8.0

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago