Get all values from a form
npm install doz-get-form-values
Live here
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())
}
});
You can view the changelog here
doz-get-form-values is open-sourced software licensed under the MIT license
Pietro Lembo