/form-builder-model

Standalone code for building form builder models

Primary LanguageCoffeeScriptGNU General Public License v3.0GPL-3.0

Standalone code for building form builder models without any UI bindings. This project can build a model and produce a Backbone object hierarchy. This model can then be rendered with ui components in the main form-builder package, or used by itself for processing input and generating JSON output.

Typical Use

The code is most easily obtained in the npm repositories under the package name 'balihoo-form-builder-model'. After install, this code will require and use it.

var http = require('some http client');
var formbuilder = require('balihoo-form-builder-model');

http.get('<formbuilderurl>/<formid>/package', function(err, result) {
  var model = formbuilder.fromPackage(result.body);
  model.applyData({foo:'bar'});
  var output = model.buildOutputData();
});

For more on building and processing saved forms, see the API Docs

For help with authoring forms, see the Model Code Docs

To develop this project or projects that use it, see Development