Coder Social home page Coder Social logo

wtnm / fform Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 1.0 3.34 MB

Flexibile and extendable form builder with constructor

Home Page: https://wtnm.github.io/fform-constructor/index.html

License: MIT License

JavaScript 38.07% TypeScript 61.05% CSS 0.88%
form react json-schema schema redux form-builder ssr jsonschema

fform's Introduction

Table of content

Overview

Flexible Form (fform) - form builder with minimum redundancy, maximum flexibility, and extendability. It uses JSONSchema to describe forms, React (v16) for rendering and has native Redux support for state storage but can be used with any other external storage or can use only internal storage (storage agnostic).

See fform-constructor for live demo.

Features

  • 98kb minified, 28kb gziped
  • form-constuctor for quick start
  • form extension, combination and reuse with JSONSchema's allOf, oneOf, $ref properties
  • sync/async/JSON/submit validation
  • storage agnostic, native redux support, can be used with any external storage or can use own internal storage
  • built-in arrays (add/del/move operations)
  • built-in viewer
  • fully customizable
  • SSR support

Installation & Usage

To install the stable version:

npm install --save fform

This assumes that you are using npm with a module bundler like webpack

Without JSON validaton

import {FForm, elements} from 'fform';
import {render} from 'react-dom';

render(<FForm core={{name:"name", schema: {type:"string"}, elements}}/>, document.querySelector('#root'));

With JSON validaton

import {FForm, elements} from 'fform';
import {render} from 'react-dom';

import imjvWrapper from 'fform/addons/imjvWrapper';
import * as imjvValidator from 'fform/addons/is-my-json-valid-lite';
const JSONValidator = imjvWrapper(imjvValidator);

render(<FForm core={{name:"name", schema: {type:"string"}, elements, JSONValidator}}/>,
		document.querySelector('#root'));

How to use with different storages see in documentation

Examples

Documentation

fform's People

Contributors

wtnm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

odnodn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.