• Stars
    star
    258
  • Rank 158,189 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

create amazing forms without coding : form editor based on angular formly

Easy form generator (AngularJS)

npm GitHub version Join the chat at https://gitter.im/MacKentoch/easyFormGenerator Bower version npm version FOSSA Status

Generate advanced and unique boostrap forms without typing a single line of code!

— easy form generator website here —

What is it?

Easy form generator (step way or drag and drop way):

  • Create forms in a matter of minutes
    • (you may not need to add "s" to minutes).
  • Don't limit your form to a single column template
    • (up to 3 controls per line).
  • generated forms use bootstrap
    • (until now the most popular front end framework)
  • based on amazing and angular formly

Complementary information to better understand easy form generator

Easy Form Generator: Step way

IMPORTANT: easyFormGenerator v2.1.1 introduced a breaking change to fix angular formly upgrade compatibility issue. This breaking change impacts Header control only. Header control field model now needs header value to be in templateOptions.placeholder (rather than in templateOptions.description). To help to ensure the right property is used by your previously saved fields model, description input is now added in Header edit modal (so just cut / paste description into header text input).

Step way version is the most accomplished and stable version.

  • cross browser compatible
  • responsive (not sure it will be used a lot but you could create a form on your smartphone with the step way version).
  • multi-language support
  • friendly configurable thanks to a single provider easyFormSteWayConfig provider
    • enable / disable modal animation
    • enable / disable controls (ex: hide rich text from editor)
    • set current language (default is english)
    • show hide preview model and / or preview panel in editor
  • production friendly

Have a try here: Easy for generator step way version

  • Step way visual preview here: previewstepway.png

Easy Form Generator: drag and drop way (BETA)

Drag and drop way version (currently in BETA) is more fun and faster to design a form

  • drag control then drop control
  • right click to open edit panel

Drag and drop way is still in development.

Chrome will give you the best experience with drag and drop version. You may encounter unexpected behaviours with other navigators.

have a try here: Easy for generator drag and drop way version

  • Drag and drop way visual preview here: previewdraganddropway

Easy form viewer: production ready

Easy form viewer is a directive which helps you using your created forms

  • when you saved your form you saved edaFieldsModel: easy form generator fields model
  • just bind it to easy form viewer directive, then it will render (without all unecessary decoration — generator useful only —): preview

How to use?


Using Step way version (production friendly)

Check demo: stepway.html in preview directory

Install

Installing easyFormGenerator will install in a row:

  • step way
  • drag and drop way
  • form viewer

Install:

npm install --save easy-form-generator

or

yarn install easy-form-generator

dependencies

Easy form generator creates amazing bootstrap forms thanks to these dependencies:

dependency npm install from dist/vendors
bootstrap (css / js) npm i --save bootstrap dist/vendors
bootswatch npm i --save bootswatch dist/vendors
jquery npm i --save jquery dist/vendors
angular js (>= 1.3.X) npm i --save angular dist/vendors
ngAnimate npm i --save angular-animate dist/vendors
angular-translate npm i --save angular-translate dist/vendors
angular-ui-bootstrap npm i --save angular-ui-bootstrap dist/vendors
textAngular npm i --save textangular dist/vendors
angular-strap npm i --save angular-strap dist/vendors
nya-bootstrap-select npm i --save @lordfriend/nya-bootstrap-select dist/vendors
angular toaster npm i --save angularjs-toaster dist/vendors

They are not include in easyFormGenerator bundle to avoid side effects / collisions in your application.

It is up to you to include them in your application depending on your dev workflow.

It will be far more talkative be checking demo:

Inject easy form generator in your app

Just inject eda.easyformGen.stepway in you application:

angular.module("YOUR_APP", [
  "eda.easyformGen.stepway" //injects easy form generator-step way
]);

All easy form generator just by this small html:

<eda-step-way-easy-form-gen></eda-step-way-easy-form-gen>

Want to Load/save models?

Add these attributes to interact with your own controller:

  • eda-easy-form-generator-model: attribute to bind your model
  • eda-save-form-event: attribute to bind save form event
<eda-step-way-easy-form-gen
      eda-easy-form-generator-model="_MODEL_"
      eda-save-form-event="_SAVE_FUNCTION_">
</eda-step-way-easy-form-gen>

eda-easy-form-generator-model properties are:

field name field format field description
formName string stores form name, default is empty string
btnSubmitText string stores submit button name, default is 'Submit'
btnCancelText string stores submit button name, default is 'Cancel'
edaFieldsModel array easy form generator fields model that describe form
edaFieldsModelStringified string edaFieldsModel but stringified (then easy to save fields model to any database)
formlyFieldsModel object angular formly fields model (filled by easy form generator from edaFieldsModel)
dataModel object filling the form feeds dataModel

eda-save-form-event function:

//your controller save function should have `edaEasyFormGeneratorModel` parameter
//it will be filled by easy form generator model
saveForm(edaEasyFormGeneratorModel);

Customize easyFormGenerator

Multilanguage support:

Default or fallback language is set to english by default (but you can change this fallback language).

language key note
english 'en'
french 'fr'
german 'de'
japanese 'jp'
spanish 'es' thx to Benjamin Orozco 👍
turkish 'tr' thx to Serhat Can 👍
bresilian portuguese 'pt-br' thx to Leandro.Battisti 👍
chinese 'zh' thx to @alansong 👍

preview

Change the default language in your controller:

angular
.module('YOURAPP', ['...'])
.config(easyFromConfigFct);

//inject easyFormSteWayConfigProvider
easyFromConfigFct.$inject = ['easyFormSteWayConfigProvider'];
function easyFromConfigFct(easyFormSteWayConfigProvider){

//example get current language (by default = english)
console.info(easyFormSteWayConfigProvider.getCurrentLanguage());
//set language to french (see corresponding keys in upper table):
easyFormSteWayConfigProvider.setLanguage('fr');

enable disable controls:

All controls are enabled by default.

  • list of controls:
control name control key
empty control empty
header header
Subtitle Subtitle
TextInput TextInput
Password Password
Email Email
IpAdress IpAdress
Date Date
Texarea Texarea
RichTextEditor RichTextEditor
Radio Radio
Checkbox Checkbox
BasicSelect BasicSelect
GroupedSelect GroupedSelect
 angular
   .module('YOURAPP', ['...'])
   .config(easyFromConfigFct);

 //inject easyFormSteWayConfigProvider
 easyFromConfigFct.$inject = ['easyFormSteWayConfigProvider'];
 function easyFromConfigFct(easyFormSteWayConfigProvider){
   /////////////////////////////
   // DISABLE EXAMPLES
   /////////////////////////////
   //disable a single control:
   easyFormSteWayConfigProvider.disableControl('TextInput');
   //disable a list of controls:
   easyFormSteWayConfigProvider.disableControl(['BasicSelect', 'GroupedSelect']);

   /////////////////////////////
   // ENABLE EXAMPLES
   /////////////////////////////
   //enable a single control:
   easyFormSteWayConfigProvider.enableControl('TextInput');
   //enable a list of controls:
   easyFormSteWayConfigProvider.enableControl(['BasicSelect', 'GroupedSelect']);

show hide preview panel details:

  • show / hide entire form preview panel
  • show / hide preview models in preview panel
angular
  .module("appDemo", [
    "eda.easyformGen.stepway" //injects easy form generator-step way
  ])
  .config(configFct)
  .controller("demoController", demoController);

/**
 * config
 */
configFct.$inject = ["easyFormSteWayConfigProvider"];
function configFct(easyFormSteWayConfigProvider) {
  //show/hide preview panel => default is true
  easyFormSteWayConfigProvider.showPreviewPanel(true);
  //show/hide models in preview panel => default is true
  easyFormSteWayConfigProvider.showPreviewModels(true);
}

Using Drag and drop way version (BETA)

Check demo: dragDropWay.html in preview directory

Install

Installing easyFormGenerator will install in a row:

  • step way
  • drag and drop way
  • form viewer

Install:

npm install --save easy-form-generator

or

yarn install easy-form-generator

dependencies

Easy form generator creates amazing bootstrap forms thanks to these dependencies:

dependency npm install from dist/vendors
bootstrap (css / js) npm i --save bootstrap dist/vendors
bootswatch npm i --save bootswatch dist/vendors
jquery npm i --save jquery dist/vendors
angular js (>= 1.3.X) npm i --save angular dist/vendors
ngAnimate npm i --save angular-animate dist/vendors
angular-translate npm i --save angular-translate dist/vendors
angular-ui-bootstrap npm i --save angular-ui-bootstrap dist/vendors
textAngular npm i --save textangular dist/vendors
angular-strap npm i --save angular-strap dist/vendors
nya-bootstrap-select npm i --save @lordfriend/nya-bootstrap-select dist/vendors
angular toaster npm i --save angularjs-toaster dist/vendors

They are not include in easyFormGenerator bundle to avoid side effects / collisions in your application.

It is up to you to include them in your application depending on your dev workflow.

It will be far more talkative be checking demo: dragDropWay.html in preview directory

Inject easy form generator in your app

Just inject eda.easyformGen.dragdropway in you application:

angular.module("appDemo", [
  "eda.easyformGen.dragdropway" //injects easy form generator drag and drop way
]);

All easy form generator just by this small html:

<eda-dragdrop-way-easy-form-gen></eda-dragdrop-way-easy-form-gen>

Want to Load/save models?

Add these attributes to interact with your own controller:

  • eda-easy-form-generator-model: attribute to bind your model
  • eda-save-form-event: attribute to bind save form event
<eda-dragdrop-way-easy-form-gen
      eda-easy-form-generator-model="_MODEL_"
      eda-save-form-event="_SAVE_FUNCTION_">
</eda-dragdrop-way-easy-form-gen>

eda-easy-form-generator-model properties are:

field name field format field description
formName string stores form name, default is empty string
btnSubmitText string stores submit button name, default is 'Submit'
btnCancelText string stores submit button name, default is 'Cancel'
edaFieldsModel array easy form generator fields model that describe form
edaFieldsModelStringified string edaFieldsModel but stringified (then easy to save fields model to any database)
formlyFieldsModel object angular formly fields model (filled by easy form generator from edaFieldsModel)
dataModel object filling the form feeds dataModel

eda-save-form-event function:

//your controller save function should have `edaEasyFormGeneratorModel` parameter
//it will be filled by easy form generator model
saveForm(edaEasyFormGeneratorModel);

Using Easy form viewer (production friendly)

demo: formviewer.html in preview directory

Install

Installing easyFormGenerator will install in a row:

  • step way
  • drag and drop way
  • form viewer

Install:

npm install --save easy-form-generator

or

yarn install easy-form-generator

dependencies

Easy form generator creates amazing bootstrap forms thanks to these dependencies:

dependency npm install from dist/vendors
bootstrap (css / js) npm i --save bootstrap dist/vendors
bootswatch npm i --save bootswatch dist/vendors
jquery npm i --save jquery dist/vendors
angular js (>= 1.3.X) npm i --save angular dist/vendors
ngAnimate npm i --save angular-animate dist/vendors
textAngular npm i --save textangular dist/vendors
nya-bootstrap-select npm i --save @lordfriend/nya-bootstrap-select dist/vendors

They are not include in easyFormGenerator bundle to avoid side effects / collisions in your application.

It is up to you to include them in your application depending on your dev workflow.

It will be far more talkative be checking demo: formviewer.html in preview directory

Inject easy form viewer in your app

Just inject eda.easyFormViewer in you application:

(function(angular){
    'use strict';
    angular
        .module('app', ['eda.easyFormViewer']) //inject easy form viewer
        .controller('demoController', demoController);

    //your controller, here an implementation suggestion
    demoController.$inject = ['$timeout'];
    function demoController($timeout){
      var demoCtrl = this;

      demoCtrl.fieldsModel    = loadMySavedEdaFieldsModel(); //="edaFieldsModel" - see easy form generator model -
      demoCtrl.dataModel			= {}; //data Model: filling form will fill it (submit event will return updated data model)

      demoCtrl.submitButtonText = 'Submit this form'; //button text
      demoCtrl.cancelButtonText = 'Cancel all'; //button text

      demoCtrl.submitFormEvent 	= submitFormEvent; //event called on form submit
      demoCtrl.cancelFormEvent 	= cancelFormEvent; //event called on form cancel

      function loadMySavedEdaFieldsModel(){
        var mySavedModel = readItWhereISavedIt();
        return mySavedModel;
      }

      //submit will return updated dataModel in "dataModelSubmitted" parameter
      function submitFormEvent(dataModelSubmitted){
        console.info('Submit event: you can manage this event in your controller');
        console.dir( {'dataModelSubmitted': dataModelSubmitted} );
      }

      function cancelFormEvent(){
        console.info('Cancel event: you can manage this event in your controller');
      }
    }
      //...

All easy form viewer directive:

<eda-easy-form-viewer
		eda-easy-form-viewer-data-model="demoCtrl.dataModel"
		eda-easy-form-viewer-easy-form-generator-fields-model="demoCtrl.fieldsModel"

		eda-easy-form-viewer-submit-button-text="{{demoCtrl.submitButtonText}}"
		eda-easy-form-viewer-cancel-button-text="{{demoCtrl.cancelButtonText}}"

		eda-easy-form-viewer-submit-form-event="demoCtrl.submitFormEvent(dataModelSubmitted)"
		eda-easy-form-viewer-cancel-form-event="demoCtrl.cancelFormEvent()">
</eda-easy-form-viewer>
eda-easy-form-viewer property format description
eda-easy-form-viewer-data-model object data model to preload form (from a previous database save for example).
eda-easy-form-viewer-easy-form-generator-fields-model object easy form generator generated form object (by step way or drag and drop way)
eda-easy-form-viewer-submit-button-text string submit button text
eda-easy-form-viewer-cancel-button-text string cancel button text
eda-easy-form-viewer-submit-form-event function to handle submit event in your controller (like saving data model for example)
eda-easy-form-viewer-cancel-form-event function to handle cancel event in your controller

What is new?

older:

  • December 2016: v2.0.0 (big tsunami update):

  • leave bower, gulp and jspm in favor of webpack + npm

  • new control: IP adress

  • new language added Brazilian Portuguese thanks to Leandro.Battisti

  • December 2016: v1.2.0 is released

  • March 2016: v1.1.0 is released.

  • November 2015: v1.1.0 coming soon: migration to ES6 + fixes

  • October 2015: Easy form Generator step way: new config available with easyFormSteWayConfigProvider:

    • show/hide preview panel
    • show hide models (in prevew panel)
angular
  .module("appDemo", [
    "eda.easyformGen.stepway" //injects easy form generator-step way
  ])
  .config(configFct)
  .controller("demoController", demoController);

/**
 * config
 */
configFct.$inject = ["easyFormSteWayConfigProvider"];
function configFct(easyFormSteWayConfigProvider) {
  //show/hide preview panel => default is true
  easyFormSteWayConfigProvider.showPreviewPanel(true);
  //show/hide models in preview panel => default is true
  easyFormSteWayConfigProvider.showPreviewModels(true);
}
  • October 2015: Easy form Generator step way: demo updated stepway with language selection

  • October 2015: Easy form Generator step way: new languages added

    • french
    • german
    • japanese
    • spanish (thx to Benjamin Orozco 👍)
    • turkish (thx to Serhat Can 👍) preview
 angular
   .module('YOURAPP', ['...'])
   .config(easyFromConfigFct);

 //inject easyFormSteWayConfigProvider
 easyFromConfigFct.$inject = ['easyFormSteWayConfigProvider'];
 function easyFromConfigFct(easyFormSteWayConfigProvider){

   //example get current language (by default = english)
   console.info(easyFormSteWayConfigProvider.getCurrentLanguage());
   //set language to french:
   easyFormSteWayConfigProvider.setLanguage('fr');
  • October 2015: Easy form Generator step way: enable or disable control in your easy form generator step way version.
 angular
   .module('YOURAPP', ['...'])
   .config(easyFromConfigFct);

 //inject easyFormSteWayConfigProvider
 easyFromConfigFct.$inject = ['easyFormSteWayConfigProvider'];
 function easyFromConfigFct(easyFormSteWayConfigProvider){

   //disable basic TextInput:
   easyFormSteWayConfigProvider.disableControl('TextInput');

   //enable Date input:
   //(NOTE: by default all controls are enabled
   //-> so this example is no other use than illustration)
   easyFormSteWayConfigProvider.enableControl('Date');

   // List of all easy form generator (step way version) controls:
   // 'empty'
   // 'Header'
   // 'TextInput'
   // 'Password'
   // 'Date'
   // 'Texarea'
   // 'RichTextEditor'
   // 'Radio'
   // 'Checkbox'
   // 'BasicSelect'
   // 'GroupedSelect'
  • Sept 2015: drag and drop way is now a simple directive eda-dragdrop-way-easy-form-gen

  • Easy form Generator - Step way: new provider: enable/disable modal animation from your own config thanks to new provider easyFormSteWayConfigProvider

angular.module("YOUR_APP", []).config(easyFromConfigFct);

easyFromConfigFct.$inject = ["easyFormSteWayConfigProvider"];
function easyFromConfigFct(easyFormSteWayConfigProvider) {
  //enable/disable easy form modal animation
  //HERE: animation disabled due to angular bootstrap backdrop bug with angular >= 1.4
  easyFormSteWayConfigProvider.setModalAnimation(false);
}
+ more easy form generator - step way - config. later
  • Fix applied in v1.0.17: 🐛 **angular bootstrap modal animation issues when using angular> 1.3 ** — backdrop won't disapear when closing modal —. Waiting for fix, so untill fix is realeased modal animation is disabled to prevent this issue 😥.

  • step way versions is now a module easier to interact with your application.

  • 📰 step way: added email control

    • email entered must follow an email pattern (validation included)
    • a validation message is displayed when entered email is invalid (pattern related)
    • preview:

email and validations

Donate

Do you use & like easyFormGenerator but you don’t find a way to show some love? If yes, please consider donating to support this project. Otherwise, no worries, regardless of whether there is support or not, I will keep maintaining this project. Still, if you buy me a cup of coffee I would be more than happy though 😄

Support via PayPal

License

The MIT License (MIT)

Copyright (c) 2019 Erwan DATIN

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FOSSA Status

More Repositories

1

react-native-beacons-manager

React-Native library for detecting beacons (iOS and Android)
Objective-C
580
star
2

react-director-admin-template

ReactJS version of Director Responsive Admin Template Free
HTML
349
star
3

react-redux-bootstrap-webpack-starter

React 16.14 + Typescript + React-Router 5 + Redux + Bootstrap 4 + Hot Reload + redux-devtools-extension + Webpack 5 + styled-components STARTER
HTML
139
star
4

react-redux-graphql-apollo-bootstrap-webpack-starter

react js + redux + graphQL + Apollo + react router + hot reload + devTools + bootstrap + webpack starter
JavaScript
127
star
5

react-bootstrap-webpack-starter

ReactJS 16.11 + new React Context API +react Router 4 + webpack 4 + babel 7+ hot Reload + Bootstrap 4 + styled-components
HTML
114
star
6

react-redux-nextjs-bootstrap-pwa-starter

a progressive web app starter with next js redux + redux-persist + bootstrap
JavaScript
70
star
7

reactNativeBeaconExample

React-Native Beacon example (medium article related)
JavaScript
45
star
8

react-redux-antdesign-webpack-starter

react + redux + ant design + react-router 4 + webpack 4 starter
JavaScript
44
star
9

react-redux-nextjs-bootstrap-starter

next + react + redux + bootstrap starter
JavaScript
24
star
10

rn-analog-clock

React-Native (iOS native bridge) native alternative to traditional time picker (Objective C bridge version).
Objective-C
21
star
11

react-redux-immutable-webpack-ssr-starter

React + React-Router 4 + Redux + ImmutableJS + Bootstrap + webpack 3 with with Server side rendering, Hot Reload and redux-devtools STARTER
JavaScript
21
star
12

reactNativeReduxFastStarter

React Native Redux fast Starter
JavaScript
17
star
13

react-native-smooth-phone-input

react-native user friendly phone input (users may not like country codes when typing their phone number 😉)
JavaScript
14
star
14

react-redux-immutable-webpack-starter

React + Redux + Immutable + React Router 4 + Bootstrap + Webpack 3 -starter
JavaScript
9
star
15

reactWeather

ReactJS-NodeJS-ExpressJS-ElasticSearch application
JavaScript
9
star
16

react-native-ibeacons

React Native library for detecting beacons (iOS and Android)
Java
9
star
17

react-material-ui-next-starter

React 16.3+ Material UI Next Starter
JavaScript
9
star
18

react-redux-bootstrap-webpack-ssr-starter

react js + redux + react router 4 + bootstrap + webpack3 + server side rendering starter
JavaScript
8
star
19

jsair-mobile

JS Air mobile application
HTML
7
star
20

react-material-starter

ReactJS + MaterialUI starter
JavaScript
5
star
21

react-redux-material-next-starter

React 16.3+ Redux Material UI Next Starter
JavaScript
5
star
22

react-bootstrap-webpack-ssr-starter

react js + bootstrap + webpack 2 + react-router 4 + server side rendering starter
JavaScript
5
star
23

reactReduxMaterialQuizz

React Redux version of the material quiz
JavaScript
5
star
24

reactjs-facebook-tutorial-in-es6

ReactJS Facebook tutorial in ES6 and using JSPM
JavaScript
4
star
25

reactMaterialQuizz

a react js material quizz (ES6)
JavaScript
4
star
26

react-native-analog-clock

A nice and native alternative to traditional time picker (Swift bridge version).
Objective-C
3
star
27

ng2MaterialQuizz

an angular2 material quizz
TypeScript
3
star
28

react-material-redux-starter

React + React-Router 4 + Redux + Material UI + Hot Reload + redux-devtools + Webpack 2 STARTER
JavaScript
2
star
29

ngMaterialQuizz

An angular material quiz (ES6)
JavaScript
2
star
30

react-bs-multi-purpose-webapp-starter

A multi-purpose web app starter made with ReactJS and Bootstrap.
JavaScript
2
star
31

reactNativeReduxSidemenuTabbarStarter

React Native Redux alternate iOS fast starter with sidemenu and tabbar
JavaScript
2
star
32

electron-react-file-management

electron-react-file-management
JavaScript
1
star
33

yeomanMeanStackBootstrapStartup

yeoman MEAN stack initiated + bootstrap
ApacheConf
1
star
34

react-es6-jspm-starter

minimalist ReactJS ES6 with JSPM starter
JavaScript
1
star
35

angular-material-harmony-starter

an angular material starter using ES6
JavaScript
1
star
36

magic-markdown-to-html

electron application to convert markdown into github flavour html
JavaScript
1
star
37

PermisDocteWebsite

PermisDocte app website
1
star
38

jest-demo

JavaScript
1
star
39

easy-form-generator-webpack-example

easyFormGenerator example use case with ES6+ and webpack
JavaScript
1
star
40

react-marvel-heroes

react (ES6+) + react router 3 + redux and... Super heroes from Marvel 😄
JavaScript
1
star
41

SimpleReactNativeStarter

a simple React Native Starter
Objective-C
1
star
42

typescript-react-native-starter

Objective-C
1
star
43

EDASwiftAnimatedBackgroundImage

background animated image - panorama like - linked in app like
Swift
1
star
44

typescript-react-bootstrap-webpack-starter

ReactJS + Bootstrap + web pack with Typescript boilerplate
TypeScript
1
star
45

node-flow-babel-starter

NodeJS (LTS) using minimalist babel for flow typing experience without any other babel transpile (pure NodeJS)
JavaScript
1
star