Giter Club home page Giter Club logo

formio-service's Introduction

This repository is now considered legacy and no longer supported. Please use the Form.io SDK instead @ https://github.com/formio/core

Please take a look at our recent repositories and help documentation at the following links.

The Form.IO Service Library

This library allows you to interface with the Form.IO API from within a Node.js application. Below is an example, of how this library can be used to retrieve all the submissions within a certain form.

var formio = require('formio-service')();
var Form = formio.Form;

// First authenticate.
formio.authenticate('[email protected]', 'password').then(function() {

    // Create a new form instance.
    var form = new Form('https://myapp.form.io/user');

    // Iterate through all the submissions.
    form.eachSubmission(function(submission) {

        // Console log the submissions.
        console.log(submission);
    });
});

Using an API key

You can also use a Form.io API key to access the API's without needing to login.

var formio = require('formio-service')({
  key: '[YOUR_API_KEY]'
});
var Form = formio.Form;

// Create a new form instance.
var form = new Form('https://myapp.form.io/user');

// Iterate through all the submissions.
form.eachSubmission(function(submission) {

  // Console log the submissions.
  console.log(submission);
});

formio-service's People

Contributors

davidroyseaman avatar mikekotikov avatar randallknutson avatar travist avatar zackurben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

formio-service's Issues

Get components schema

Is there anyway to reproduce this behaviour from formiojs
Formio.Components.components.textfield.schema()
using formio-service ?

User and admin login account conflict

Hello,

It has been fun using this product and trying out the 'Formio ecosystem' - an excellent product.

I am experimenting with a plugin in WordPress using the formio-php library to login or register a user, and get that user's JWT token for form submission. What I noted was that given the case where I have an admin account with a specific email and a user account with the same email (auto-generated in this case via the WordPress plugin), I am only able to log in to the user account.

It seems the login form prefers the user role over the admin role. Is that intentional? I would expect a different result, either:

  1. Both user and admin logins work and logs in the appropriate user and role. (If password was somehow the same for both accounts, defaults to logging in the more privileged user role, in this case admin) OR
  2. There is a way to do an 'admin' login, and a separate way to do a 'user' login.

Thanks for any advice. Not a big deal for us yet (since we can have the admins jump through hoops - e.g. [email protected] is considered unique from [email protected]). However, I thought I'd bring it up in case it was unintentional or there was a better solution.

Ryan

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.