1.6.0 • Published 7 years ago

@synapsestudios/form-schema v1.6.0

Weekly downloads
48
License
MIT
Repository
github
Last release
7 years ago

form-schema

A library for building and exporting a form schema that can be used to generate dynamic forms

Usage

const FormSchema = require('@synapsestudios/form-schema');
const formSchema = new FormSchema();

// addField with string args. Requires a name and a type
formSchema.addField('name', 'hidden');

// addField with object arg. Requires a name and a type
formSchema.addField({
  name: 'some-great-field',
  type: 'text',
  label: 'Some Greate Field',
  value: 'This is a cool field!',
});

// get the form schema as a plain old javascript object
const schema = formSchema.getFormSchema();

// remove a field by name
formSchema.removeField('some-great-field');

Development

git clone git@github.com:synapsestudios/form-schema.git
cd form-schema
yarn install
1.6.0

7 years ago

1.5.3

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.5.0-rc1

7 years ago

1.4.0

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago