1.1.0 • Published 4 years ago
fancy-form v1.1.0
form-maker
Make bootstrap forms with a few steps.
installing
npm install fancy-form
try importing package to your script file / or use our importing tip
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
1.1.0
4 years ago