Skip to content

Generate form html, js, and json-schema all from one master schema.

License

Notifications You must be signed in to change notification settings

jasoniangreen/iso-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iso-form

Build Status npm version Code Climate Test Coverage

An isomorphic, schema based form generator that can be used in the client, on the server, or even to pre-compile forms in the build phase. This is the core library that is used to register form types. Support will soon be added for pluggable "processors" that can be loaded to create types for different use cases and different frameworks.

###Example

var isoForm = new IsoForm();

// To use, register a type with a name and a template function
isoForm.addItemType('input', function (itemData) {
    return '<input id="' itemData.id '">';
});

// Or types can be registered with strings instead
isoForm.addGroupType('group', '<div>', '</div>');

var form = isoForm.build({
    type:'group',
    items: [
        { type: 'input', id: 'test' }
    ]
});

// form.isValidSchema == true;
// form.html == '<div><input id="test"></div>';

Warning: This is still very much a work in progress.

About

Generate form html, js, and json-schema all from one master schema.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published