Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
Randall Knutson edited this page Jul 27, 2016 · 14 revisions

ngFormioHelper Docs

Note: Relative to your index.html, there must be a views/user/auth.html

Required files (relative to index.html):

  • views/user/auth.html
  • views/user/(any "name" instances of the .register method).html

FormioProvider

.setBaseUrl(url);

Name Type Description
url String The base url to your Form.io account

Example: https://(your unique Form.io project ID).form.io/

Events

$scope.$on('rowView', function(event, submission){})

$scope.$on('submissionView', function(event, submission){})

$scope.$on('submissionEdit', function(event, submission){})

$scope.$on('submissionDelete', function(event, submission){})

Name Type Description
event String The event.
submission Object The result of the submission as a promise.

States

resource + 'Index'

This state contains the ng-formio-grid with all of the submissions. If you click the links inside the first column, it will take you to a tabbed template that will allow you to View/Edit/Delete that single submission.

Example: $state.go('exampleResourceIndex')

resource + '.view', resource + '.edit', resource + '.delete'

This state contains the submission that was clicked on and fired the rowView event. Now that access to the submission's id was given, the submission id must be passed in as a stateParam to the $state.go() method. The key in the stateParam method MUST be the name of the resource + "Id"

Example: #### $scope.$on('rowView', function(event, submission){ $state.go('exampleResource.view', {"exampleResourceId" : submission._id}) })

Example: #### $scope.$on('rowView', function(event, submission){ $state.go('exampleResource.edit', {"exampleResourceId" : submission._id}) })

Example: #### $scope.$on('rowView', function(event, submission){ $state.go('exampleResource.delete', {"exampleResourceId" : submission._id}) })

Clone this wiki locally