This package has been deprecated

Author message:

No longer maintained.

bootform

0.1.2 • Public • Published

NPM version Build Status Dependency Status

Generate forms from json objects.

Bootform takes a json object and treats it as a description of an html form.

Example:

 
   {
     "name":"MyForm",
     "action": "/post",
     "method": "post",
     "controls": [{"type":"text"},{"type":"text"}]
   }
 

The above json will create the following html:

<form class="form-horizontal " name="MyForm" action="/post" method="post">
  <div class="form-group">
  
  <div class="col-md-9 pull-right">
    <input class="form-control" type="text"  />
  </div>
</div>
 
 
<div class="form-group">
  
  <div class="col-md-9 pull-right">
    <input class="form-control" type="text"  />
  </div>
</div>
 
 
</form>
 

Install

$ npm install --save bootform

Usage

var bootform = require('bootform').getInstance(pathToTemplates);
var html = bootform.parse(input);
 
$ npm install --global bootform
$ bootform --help

Themes

Bootform comes with one default theme in the default folder. To create your own, you can follow the pattern in there.

License

MIT © Lasana Murray

Package Sidebar

Install

npm i bootform

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • metasansana