Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kendaganio/toguro

Isang daang porsiyento
https://github.com/kendaganio/toguro

form-builder forms jsonschema vanilla-js

Last synced: 3 days ago
JSON representation

Isang daang porsiyento

Awesome Lists containing this project

README

        

# Toguro · [![Build Status](https://travis-ci.org/kendaganio/toguro.svg?branch=master)](https://travis-ci.org/kendaganio/toguro)
> Turn your JSON to 100% working forms.





Toguro in his 100% form.

## Install
via package managers
```
yarn add toguro
npm i toguro
```

via a CDN
```html

```

## Usage

You need to provide a [JSON Schema](http://json-schema.org/)
```javascript
var schema = {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
},
"age": {
"type": "integer",
"title": "Age",
},
"description": {
"type": "string",
"title": "Description",
}
},
"required": [
"name"
]
}
```

Instantiate and render

```javascript
var toguro = new Toguro({
schema: schema,
submit: (formData) => { console.log(formData) }
})

toguro.renderTo(document.getElementById("some-id"))
```