#Bootstrap v 3.0.0 Form Builder
##What's this?
A Drag-and-drop form builder built on twitter bootstrap.
Currently using v. 3.0.0
๐ฌ
###Notes
-
This project is still under development.
-
For development & debugging change the data-main for the require script tag in
index.html
to point atassets/js/main.js
. (Look just before the closing<body>
tag!) -
Once done, change it back to build for production using the
build.js
script in theassets/js/lib
folder and r.js. Then revert toassets/js/main-built.js
-
The full command is
r.js -o assets/js/lib/build.js
which should be run from the base directory.
- In the js/data/bubobox.json file you can find the definition for existing form elements
- If you just want to add a new element you need to:
- describe it in this file
- create a corresponding template in the templates/snippet directory for display in the builder and one in the templates/export directory to define how it should be rendered for export
- add the template to snippet-templates.js in the snippet directory and snippet-templates.js in the export directory
- expand the code in parsed-snippet.js to allow the Form Builder to parse your new element when it needs to load an existing form
Don't forget to switch to main.js rather than main-built.js, or the changes you make before compiling with require.js won't show up!