View on GitHub

form-builder

JavaScript library for creating and modifiyng object editing forms

FormBuilder JavaScript Library

JavaScript (TypeScript) form builder library. Allows tp create, modify and save layout for JSON object data.

Sample usage

If you have the following plain JavaScript object (obtained from a database):

var object = {
    name: "Tom",
    surname: "Young",
    zipcode: "103844",
    city: "Kanzas",
    address: "Mountain drive, 754",
    phone: "2-300-765-11-22",
    data: {
        first_name: "Bob",
        last_name: "Sallivan",
        email: "bob@sallivan-family.org",
    }
}

var layout = null;

You can pass this object, the layout (if you have one), the DOM element and the update callbacks function to the Form.show() method:

var model = FormBuilder.Form.show(object, layout, document.getElementById("form-builder-container"),
    function(object, json) {
        // handle model changes here
    },
    function(layout) {
        // handle layout changes here
    }
);

And you will get the following UI:

FormBuilder Form Screen

Basic functions

Supported frameworks

Online demos

How to compile this repo

Welcome to GitHub Pages

Click here to visit default welcome page