https://github.com/ignf/collab-form
https://github.com/ignf/collab-form
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ignf/collab-form
- Owner: IGNF
- License: agpl-3.0
- Created: 2024-01-12T09:10:16.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T12:39:30.000Z (almost 2 years ago)
- Last Synced: 2025-01-16T09:56:04.410Z (about 1 year ago)
- Language: JavaScript
- Size: 132 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# collab-form
Module javascript permettant la création et la gestion de formulaires provenant de l'api collaboratif.
## Dépendances
Le module fonctionnant avec JQuery, la variable globale $ doit être définie dans le projet
Autres dépendances:
moment
tempusdominus-bootstrap-4
ajv-i18n
combobox
## Exemple d'utilisation
html:
<div id="#my-form-container"></div>
script:
import {createForm} from collab-form;
let theme = mon_theme_recupere_via_api;
let form = createForm($("#my-form-container"), "my-first-form", theme);
form.init() //lorsque le dom est completement charge
let validate = function() {
let valid = true;
for (var i in form.attributes) {
if (!form.attributes[i].validate()) {
alert(attribute.error);
valid = false;
}
}
}
## Attention
Les traductions restent à faire.