Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vednig/forms.js
Open Sourced JS to Create Forms Dynamically. Issues and PRs are welcome.
https://github.com/vednig/forms.js
bootstrap bootstrap4 dynamic-forms form form-validation forms google js
Last synced: 9 days ago
JSON representation
Open Sourced JS to Create Forms Dynamically. Issues and PRs are welcome.
- Host: GitHub
- URL: https://github.com/vednig/forms.js
- Owner: vednig
- License: mit
- Created: 2020-10-12T20:44:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T17:36:47.000Z (8 months ago)
- Last Synced: 2024-04-17T14:15:42.316Z (7 months ago)
- Topics: bootstrap, bootstrap4, dynamic-forms, form, form-validation, forms, google, js
- Language: JavaScript
- Homepage:
- Size: 28.3 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.
Create Dynamic Forms Like these:
## **Building Sample Mail Subscribe Form with forms.js**
- include 'bootstrap'
- include 'forms.js'
```html
div=document.getElementById('df-1')
x=formcreate(div,'GET','forms.js','uk',{'class':'red'})
console.log(x)
y=formadd(x,'label','y',{class:'container text-primary',value:'Go'},'Subscribe to Email')
z=formadd(y,'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 )