1.2.3 • Published 6 years ago

formcreator-dynamic v1.2.3

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

DynamicFormGen

How to Use

Require and Build the JSON

  1. Require the util file
const FormGen = require('formcreator-dynamic');
  1. Sample object to create the form
FormGen.generate(
  {
  tags: [
    {
      tag: 'label',
      value: 'Name',
      for: 'name',
    },
    {
      tag: 'input',
      type: 'text',
    },
    {
      tag: 'select',
      options: ['THis', 'Is', 'a', 'valuE'],
    },
  ],
  settings: {
      action: '/save-item',
      method: 'POST',
    },
})

Acceptable tags

  • input
  • select
  • label
1.2.3

6 years ago

1.2.1

6 years ago

1.1.1

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago