Add interactive Form Elements for CreateJS and AnimateCC projects
The work isn't finished yet. Watch it for update progress!
https://jhintringer.github.io/createjs.form/example/example.html
Create Dynamic Textfield with a proper name and call createjs.Form.convert(ELEMENT, "class", {opts..});
Possible Classes are: (to be continued)
- input
- checkbox
- select
All form elements found are collected in createjs.Form.elements using the name as key. So you can access the form element by calling:
createjs.Form.elements.email
Elements can have their own validate-Function inside options. Also the field "required" gets checked in options. Simply call:
if(createjs.Form.validate(createjs.Form.elements.email) == true) {} // for a particular element // or if(createjs.Form.validate(createjs.Form.elements)) {} // for all elements
to check for a valid value.
If a value is invalid, then the "onInvalid" function inside the element's options will be called and the validate function will return false.
EaselJS v1.0.0 (September 2017)