Skip to content

Commit

Permalink
Merge pull request #47 from zamicol/master
Browse files Browse the repository at this point in the history
Add "schema" var to the example for clarity.
  • Loading branch information
idelvall authored Dec 20, 2016
2 parents e1ef1ad + 91742f3 commit 55c0bbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ Optionally, include the bootstrap extension (requires bootstrap):
```html
<script src="dist/js/brutusin-json-forms-bootstrap.min.js"></script>
```
Create the javascript `BrutusinForms` instance, being `schema` a javascript `object` representing the schema structure:
Create the javascript `BrutusinForms` instance, `schema` being a javascript `object` representing the schema structure:
```javascript
var schema = new Object({"type": "boolean"})
var BrutusinForms = brutusin["json-forms"];
var bf = BrutusinForms.create(schema);
```
And finally, render the form inside a container, with optional JSON initial `data` preloaded:
And finally render the form inside a container with optional preloaded JSON initial data, `data`:
```javascript
var container = document.getElementById('container');
bf.render(container, data);
Expand Down

0 comments on commit 55c0bbb

Please sign in to comment.