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
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: { return appformClient; }
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 = mbaasApi = app = mbaasExpress = mbaasApi mediator = ; // configure the express app... // setup the wfm user routermbaasApi;
Forms events
This module will subscribe to the the submissionEventListener
and react on these events :
submissionStarted
submissionComplete