GithubHelp home page GithubHelp logo

fabiostivanin / ngformio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from formio/ngformio

0.0 1.0 0.0 45.82 MB

JSON powered form rendering library for Angular.js + Form.io.

Home Page: http://formio.github.io/ngFormio/

License: MIT License

CSS 2.19% JavaScript 76.36% HTML 21.45%

ngformio's Introduction

An Angular.js JSON form renderer for Form.io

This library is meant to be used in conjunction with Form.io to provide dynamic JSON form rendering capabilities. This allows you to render any form using the schemas provided by Form.io in the following format.

<formio src="'https://myapp.form.io/myform'"></formio>

The following snippit of code will dynamically render the form within Form.io, as well as automatically hook that form up to the REST API generated from the same schema.

Here is a Demo

http://codepen.io/travist/full/xVyMjo/

Multi-page Forms

This renderer also supports multi-page forms using the formio-wizard directive like so.

<formio-wizard src="'https://myapp.form.io/mywizard'"></formio-wizard>

This directive uses Panels within the root of the form to indicate new pages within the form.

Installation

There are several ways to add this library to your application. Each of these installation types are for specific use cases.

Full Installation

  • Includes: Everything including Angular.js and jQuery.

  • Usage: Use this installation if your application does not already have Angular and jQuery and you wish to display a single form on a page.

  • Installation: Place the following within your application.

<script src="https://rawgit.com/formio/ngFormio/master/dist/formio-full.min.js"></script> ```

Complete Installation

  • Includes: Everything except Angular.js and jQuery

  • Usage: Use this if you are embedding a form within an application that already has Angular.js and jQuery installed.

  • Installation: Place the following within your application.

<script src="https://rawgit.com/formio/ngFormio/master/dist/formio-complete.min.js"></script> ```

Basic Installation: (Bower Installation)

  • Includes: Only the ngFormio renderer library with no dependencies.

  • Usage: When you wish to explicitely include all of the dependencies like when you are using Wiredep.

  • Installation: We recommend using Wiredep for the Basic installation since it will wire up all the dependencies for you. You just need to place the following within your application.

    First install the dependency using Bower

bower install --save ng-formio ```

Then, you can add the following to your application.

```
<html>
<head>
  <!-- bower:css -->
  <!-- endbower -->
</head>
<body>
  <!-- bower:js -->
  <!-- endbower -->
</body>
</html>
```

Then run Wiredep to wire it up.

```

$ node

require('wiredep')({ src: 'index.html' }); ```

We also recommend using this within a [Gulp](http://gulpjs.com/) build process using Wiredep in combination with [Gulp UseRef](https://github.com/jonkemp/gulp-useref).

Configuration

Once you have this installed, you will now need to add this module within your Angular.js application declaration like so...

app.js

angular.module('yourApp', [
  'formio'
])

Usage

Now that you have the library installed, you can then do the following to add a form to your application.

  • Create an account on https://form.io
  • Create a new project.
  • Create a Form within your project. This will then give you an API url like the following. https://myapp.form.io/myform.
  • You can then embed this form within your application by providing the following.

<formio src="'https://myapp.form.io/myform'"></formio>

This not only renders the form dyanmically within your application, but also automatically hooks up that form to the API backend that is provided from Form.io.

Enjoy!

The Form.io Team!

ngformio's People

Contributors

travist avatar randallknutson avatar zackurben avatar rahatarmanahmed avatar douglaselee avatar andreiho avatar nickkhall avatar abdallaelabd avatar taoyuan avatar santhosh-ktec avatar wonder95 avatar blackbaud-scottvossen avatar edwinanciani avatar blackbaud-jeremymorgan avatar johnazre avatar yuryrybaksoftensity avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.