GithubHelp home page GithubHelp logo

forkedit / vue-formio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from formio/vue

0.0 1.0 0.0 78 KB

Javascript Powered forms and JSON form builder for Vue.js

License: MIT License

TypeScript 100.00%

vue-formio's Introduction

vue-formio

A Vue.js component for rendering out forms based on the Form.io platform.

Install

npm

Vue Formio can be used on the server, or bundled for the client using an npm-compatible packaging system such as Browserify or webpack.

npm install vue-formio --save

Basic Usage

HTML inside of Vue template file:

<template>
  <div id="app">
    <formio src="" url="" form="" submission="" options="" v-on:submit=""></formio>
  </div>
</template>

Javascript inside of Vue template file.

<script>
  import { Form } from 'vue-formio';
  export default {
      name: 'app',
      components: { formio: Form },
  }
</script>

Props

src : string

The form API source from form.io or your custom formio server.

See the Creating a form for where to set the API Path for your form.

You can also pass in the submission url as the src and the form will render with the data populated from the submission.

url : string

If you pass in the form and submission directly, some components such as resources, files and forms need to know the url of the form on the server. Pass it in with the url option.

form : object

An object representing the form. Use this instead of src for custom forms.

Note: src will override this property if used.

submission: Object

An object representing the default data for the form.

Note: src will override this if a submission url is entered.

options: object

An object with the formio.js options that is passed through. See Form.io Options.

Events

All events triggered from the form are available via the v-on property. See Form.io Events for all the available events.

Then on the form set <formio src="myform" v-on:submit="doSomething" />

FormBuilder

HTML inside of Vue template file:

<template>
  <div id="app">
    <formbuilder v-bind:form="{display: 'form'}" v-bind:options="{}" v-on:change="(schema) => console.log(schema)"></formio>
  </div>
</template>

Javascript inside of Vue template file.

<script>
  import { FormBuilder } from 'vue-formio';
  export default {
      name: 'app',
      components: { FormBuilder },
  }
</script>

License

Released under the MIT License.

vue-formio's People

Contributors

cabrerabywaters avatar randallknutson avatar

Watchers

 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.