https://github.com/vednig/forms.js
Vanilla JS Library to Create Forms Dynamically
https://github.com/vednig/forms.js
bootstrap bootstrap4 dynamic-forms form form-validation forms google js
Last synced: 3 months ago
JSON representation
Vanilla JS Library to Create Forms Dynamically
- Host: GitHub
- URL: https://github.com/vednig/forms.js
- Owner: vednig
- License: mit
- Created: 2020-10-12T20:44:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T13:43:00.000Z (7 months ago)
- Last Synced: 2025-03-28T07:51:12.507Z (3 months ago)
- Topics: bootstrap, bootstrap4, dynamic-forms, form, form-validation, forms, google, js
- Language: JavaScript
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# forms.js
Open Sourced JS to Create Forms Dynamically.
Object Mapped
Create Dynamic Forms Like these:
## **Building Sample Mail Subscribe Form with forms.js**
- include 'bootstrap'
- include 'forms.js'
```html
div=document.getElementById('dataform')
myform=formcreate(div,'GET','forms.js','uk',{'class':'red'})
console.log(myform)
label=formadd(myform,'label','y',{class:'container text-primary',value:'Go'},'Subscribe to Email')
email=formadd(myform,'input','z',{class:'form form-control',placeholder:'Email-Address'})
```
## **Functions**
`formcreate` - creates form component
- div - provide DIV to add form to.
- form_type - `POST`/`GET`
- id - Id of New Element
- props - define props of element
- innerHTML - inside of element (can be label or div )
`formadd` - adds a component to formcreate object.
- div - provide formcreate instance
- element_type - `INPUT`/`BUTTON`/`LABEL`
- id - Id of New Element
- props - define props of element
- innerHTML - inside of element (can be label or div )