Skip to content

dozjs-cmp/doz-get-form-values

Repository files navigation

doz-get-form-values

Get all values from a form

Install

npm install doz-get-form-values

Live here

Usage

Globally

import Doz from 'doz'
import dozGetFormValues from 'doz-get-form-values'

Doz.use(dozGetFormValues);

new Doz({
    root: '#app',
    template(h) {
        return h`
        <form d-ref="form">
          First name:<br>
          <input type="text" name="firstname" value="Mickey">
          <br>
          Last name:<br>
          <input type="text" name="lastname" value="Mouse">
          <br><br>
        </form>
        <button onclick="this.onClick()">Submit</button>
        `
    },

    onClick(){
        console.log(this.getFormValues())
    }
});

Changelog

You can view the changelog here

License

doz-get-form-values is open-sourced software licensed under the MIT license

Author

Pietro Lembo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published