Fork me on GitHub

inputex-jsonschema

Jump to Table of Contents

Build a form from JsonSchema

HTML

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

<div id="container1"></div>
Open the schema file : ../assets/inputex-jsonschema/base-schema.js

JavaScript

Implementation

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

var m = builder.schemaToInputEx(base_schema_map.community);
m.parentEl = 'container1';

var f = Y.inputEx(m);