Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 )