1.1.0 • Published 4 years ago

fancy-form v1.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

form-maker

Make bootstrap forms with a few steps.

installing

  1. npm install fancy-form

  2. try importing package to your script file / or use our importing tip

  3. try using functions to make forms and elements

importing

import as former from '/node_modules/fancy-form/fancy-form.js';*

makeForm function

makeForm( '.main' , { placeholder:"name" },{ placeholder:"eman" } )

this will make 2 inputs with placeholder attribute and append it to the main class

createInput function

makeForm( '.main' ,{ placeholder:"name" })

this will make an input with placeholder of name and append it to the main class

formOpt function

btnOpt('body','/myAction', 'GET', 'Edit Post', () => { ... });

Assign form and submit button attributes

object attributes

you can use this for both form creating and input creating

  • name
  • type
  • value
  • required
  • class
  • style