Fork me on GitHub

inputex-jsonschema

Jump to Table of Contents

Create a form from a json-schema - autoloading required dependencies

HTML

<!-- json schema to load -->
<script src="../assets/inputex-jsonschema/base-schema.js"></script>

<div id="container1"></div>

JavaScript

Implementation

var builder = new Y.inputEx.JsonSchema.Builder({
    'schemaIdentifierMap':base_schema_map,
    'defaultOptions':{
        'showMsg':true
    }
});

var m = builder.schemaToInputEx(base_schema_map.community);

Y.inputEx.use(m, function() {
    m.parentEl = 'container1';
    Y.inputEx(m);
});