Get started with json-forms CDN

Apache-2.0 licensed

JSONForms is a library for rendering and editing forms based on JSON schema.

Tags:
  • json
  • forms
  • dynamic
  • schema
  • json-schema

Stable version

Copied!

How to start using json-forms CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with json-forms CDN - cdnhub.io</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/json-forms@1.6.3/css/brutus-style.css">
  <script src="https://cdn.cdnhub.io/json-forms/1.6.3/js/brutusin-json-forms.min.js"></script>
</head>
<body>
  <div id="form-container"></div>
  <script>
    const schema = {
      type: 'object',
      properties: {
        name: { type: 'string' },
        age: { type: 'number' },
        hobbies: { type: 'array', items: { type: 'string' } }
      }
    };

    const formData = {
      name: 'John Doe',
      age: 30,
      hobbies: ['reading', 'swimming']
    };

    const form = new JSONForms.Form('#form-container', schema, formData);
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions