fh-wfm-appform

0.0.25-b1 • Public • Published

FeedHenry RainCatcher AppForms

A RainCatcher AppForm module for FeedHenry RainCatcher. This module provides :

  • A set of AngularJS directives
  • An AngularJS Service to interact with AppForms.
  • A backend Service to interact with AppForms

Client-side usage (via broswerify)

Setup

This module is packaged in a CommonJS format, exporting the name of the Angular namespace. The module can be included in an angular.js as follows:

angular.module('app', [
, require('fh-wfm-appform')
...
])

Integration

Angular Services

This module provides a injectable file service : appformClient

This client offers these functions :

  • init
  • list
  • getForm
  • getSubmissionLocal
  • getSubmission
  • getSubmissions
  • getFields
  • createSubmission
  • submitSubmission
  • uploadSubmission
  • composeSubmissionResult
  • syncStepResult
  • watchSubmissionModel

Example of getForm usage :

resolve: {
    form: function($stateParams, appformClient) {
      return appformClient.getForm($stateParams.formId);
    }
  }

For a more complete example around files operations, please check the demo portal app.

Directives
Name Attributes
appformSubmission submissionLocalId, submissionId, submission
appform form, formId
appformField field, model
appformFieldLocation field, model
appformFieldPhoto field, model
appformFieldNumber field, model
appformFieldDatetime field, model
appformFieldDate field, model
appformFieldTime field, model

Usage in an express backend

The server-side component of this RainCatcher module exports a function that takes express and mediator instances as parameters, as in:

var express = require('express')
  , mbaasApi = require('fh-mbaas-api')
  , app = express()
  , mbaasExpress = mbaasApi.mbaasExpress()
  , mediator = require('fh-wfm-mediator/lib/mediator')
  ;
 
// configure the express app
...
 
// setup the wfm user router
require('fh-wfm-appform/lib/server')(mbaasApi);
 

Forms events

This module will subscribe to the the submissionEventListener and react on these events :

  • submissionStarted
  • submissionComplete

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.25-b12latest
0.1.1-alpha.e30455d30canary
0.1.0-00development
0.0.21-alpha.10developement

Version History

VersionDownloads (Last 7 Days)Published
0.1.1-alpha.e30455d30
0.0.25-b12
0.1.00
0.1.0-00
0.0.250
0.0.240
0.0.230
0.0.220
0.0.21-alpha.10
0.0.213
0.0.190
0.0.180
0.0.18-alpha.10
0.0.19-alpha.10
0.0.170
0.0.160
0.0.150
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.50
0.0.42
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i fh-wfm-appform

Weekly Downloads

7

Version

0.0.25-b1

License

MIT

Last publish

Collaborators

  • emilioicai
  • grdryn