WSUCEG-7140 / Team-Alpha

JSON Schema to HTML form generator, supporting dynamic subschemas (on the fly resolution). Extensible and customizable library with zero dependencies. Bootstrap add-ons provided

Home Page:http://brutusin.org/json-forms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

json-forms

org.brutusin:json-forms is a javascript library that generates HTML forms from JSON Schemas.

Status

We have updated our own flavour of Brutusin forms to an extent where we have covered all the fields and attributes that a form possess. Our project mainly generates HTML Form from Json schemas.


Table of Contents:

Features

  • Dynamic schemas support
  • Extensible and customizable
  • No external libraries needed
  • Validation
  • Multiple forms per document supported

Demo

[demo]

API

Static members:

Member Description
BrutusinForms.create(schema) BrutusinForms factory method
BrutusinForms.addDecorator(f(htmlElement, schema)) Register a callback function to be notified after an HTML element has been rendered (passed as parameter). See brutusin-json-forms-bootstrap.js for an example of bootstrap decorator.
BrutusinForms.postRender(instance) Callback function to be notified after a BrutusinForms instance has been rendered (passed as parameter)
BrutusinForms.instances Array containing all the BrutusinForms instances created in the document by the factory method.

Instance members:

Member Description
bf.render(container, data) Renders the form inside the the container, with the specified data preloaded
bf.validate() Returns true if the input data entered by the user passes validation
bf.getData() Returns the javascript object with the data entered by the user
bf.schemaResolver(schemaIdArray, data) Schema resolver for dynamic schemas

Issues

Issue#6 - Remove Colon from Title in Json Schema's

Issue#7 - Make changes to string element to be empty rather than null.

Issue#5 - Write Documentation for changes to be done in the sprints.

Issue#4 - Write test cases to test ongoing changes.

Issue#9 - Remove eval function.

Issue#10 - Add new field to support email and its validation

Issue#11 - Clean data after onChange between oneOf

Issue#12 - Add collapsible form support

Issue#13 - Add new field to support Date and time

Issue#15 - Validation to fail if required field is empty

Issue#17 - Display default values in an array when initial data is passed

Issue#19 - Support Custom-Class Support

Issue#24 - Add new field to support radio buttons

Issue#32 - getData() function to get working with oneOf schema

Issue#35 - Add functionalities to work with radio buttons

Issue#37 - Add new field to support URL type

Issue#38 - Add new field to support checkboxes in a field

Issue#41 - Add new field to support phone number

Issue#42 - Add more test cases to additional functional UI changes

Issue#43 - Add a reset button in final page to update all fields to Null

Issue#44 - Fix data support for checkbox which is retrieving empty values

Issue#45 - Update bootstrap version to 4.6 and give website modern look

Issue#48 - Add new schema for URL Changes

Issue#50 - Fix the error message that are not appearing when there is an error in the schema

Issue#51 - Add new field to support range input type

Issue#52 - Update Radio Button and Checkbox UI with new Bootstrap Version

Issue#53 - Add new schema to create registration form

Issue#54 - Add Collapsible form changes as a new schema

Issue#55 - Abstract usage of glyphicon as bootstrap 4 doesn't support it

Issue#64 - Add Red border to text field when there is validation error

Issue#65 - Add new schema for Contact Form

Issue#66 - Beautify the form to loosen the fields with bootstrap 4

Issue#67 - Add new schema for Delivery Form

Issue#68 - Add new field to support file format type

Issue#69 - Add new schema for Product Listing Form

Issue#70 - Update Validation Error Popup with bootstrap 4 update

Issue#71 - Commit the changes of meeting minutes

Issue#72 - Add Design Documentation for the project

Issue#87 - Add Changes for Contract Programming

Documentation

We have used both Doxygen and Jsdoc for documentation of code. Jsdoc supports documentation for javascript Files. Doxygen provides documentation for rest of the files.

Command to run Doxygen - doxygen Doxyfile Command to run JsDoc - jsdoc -c jsdoc.json

Documentation changes have been automated and able to run with Action which uses configuration file

Program By Contract

Contract Programming has been implemented to this project code. Have croppped both modified and added functions of this project into below 2 text files for easy reference. File_1 File_2

Literate Programming

Literate Programming changes have been added to this project code. Attached files for reference. File_1 File_2

Support bugs and requests

https://github.com/WSUCEG-7140/Team-Alpha/issues

Authors

  • Yaswanth Jonnakuti - jonna01
  • Rakesh Gunturu - gunturuwsu
  • Saikumar Pulluri - saikumarpulluri
  • Rohith Kalakuntla - kalakuntlarohith

Credits

Contributions are always welcome and greatly appreciated!

About

JSON Schema to HTML form generator, supporting dynamic subschemas (on the fly resolution). Extensible and customizable library with zero dependencies. Bootstrap add-ons provided

http://brutusin.org/json-forms

License:Apache License 2.0


Languages

Language:JavaScript 61.9%Language:HTML 27.8%Language:Python 4.8%Language:CSS 2.8%Language:SCSS 1.4%Language:Less 1.4%