@default-js/defaultjs-html-form
v2.5.26
Published
a formular engine to support multi page, list, condition of visual, validations, messages depends on data and custom field. The result of an filled form would be a valid json. Ready to send so any rest services.
Downloads
15
Readme
defaultjs-html-form
How to install
NPM
npm install @default-js/defaultjs-html-form
Browser
<script src="/dist/browser-defaultjs-html-form.js"></script>
How to use
<d-form>
<d-page>
<d-field name="field">
<input type="text">
</d-field>
<d-container name="container">
<d-field name="field">
<input type="text">
</d-field>
</d-container>
<d-list>
<template>
<d-row>
<d-delete-row>delete</d-delete-row>
<d-field name="field">
<input type="text">
</d-field>
</d-row>
</template>
<d-rows></d-rows>
<d-add-row>new entry</d-add-row>
</d-list>
</d-page>
<d-control>
<d-control-back>prev</d-control-back>
<d-control-next>next</d-control-next>
<d-control-summary>show summary</d-control-summary>
<d-control-submit>submit</d-control-submit>
</d-control>
</d-form>
find("d-form").on("d-form-submit",async (event) => {
const form = event.target;
const data = await form.value();
console.log(data);
});