This would be a change that would be made to the following file to allow for custom default components added to each new form.
https://github.com/formio/formio-app-formbuilder/blob/master/src/app/index.route.js
| var workflow = new FormioWizard(document.getElementById('workflow')); | |
| workflow.form = { | |
| components: [ | |
| { | |
| type: 'hidden', | |
| key: 'score', | |
| input: true, | |
| defaultValue: 0, | |
| calculateValue: { | |
| "+": [ |
This would be a change that would be made to the following file to allow for custom default components added to each new form.
https://github.com/formio/formio-app-formbuilder/blob/master/src/app/index.route.js
| ± |tag:v1.16.4 {6} ✓| → license-checker | |
| ├─ JSONStream@1.3.0 | |
| │ ├─ licenses: (MIT OR Apache-2.0) | |
| │ ├─ repository: https://github.com/dominictarr/JSONStream | |
| │ ├─ publisher: Dominic Tarr | |
| │ ├─ email: dominic.tarr@gmail.com | |
| │ ├─ url: http://bit.ly/dominictarr | |
| │ └─ licenseFile: /Users/travistidwell/Documents/formio/modules/formio/node_modules/JSONStream/LICENSE.MIT | |
| ├─ abbrev@1.0.9 | |
| │ ├─ licenses: ISC |
| ### | |
| # A LOT OF OTHER CONFIGURATIONS MAY BE ABOVE THIS POINT. | |
| ### | |
| server { | |
| listen 443 ssl; | |
| server_name dev.example.com; | |
| ssl_certificate /usr/local/etc/nginx/nginx.crt; | |
| ssl_certificate_key /usr/local/etc/nginx/nginx.key; | |
| location / { |
| <h3>Please provide your new password to reset your password.</h3> | |
| <formio form="form"></formio> |
| { | |
| "AWSEBDockerrunVersion": "1", | |
| "Authentication": { | |
| "Bucket": "formio-docker", | |
| "Key": ".dockercfg" | |
| }, | |
| "Image": { | |
| "Name": "formio/formio-server:latest", | |
| "Update": "true" | |
| }, |
| angular.module('myApp') | |
| .controller('FormSubmissionController', [ | |
| 'Formio', | |
| '$http', | |
| function(Formio, $http) { | |
| $scope.form = null; | |
| // Render the form manually. This will not call the Form.io API when it is submitted, but rather | |
| // just trigger the formSubmission event. | |
| (new Formio('https://myproject.form.io/myform')).loadForm().then(function(form) { |
| var header = true; | |
| module.exports = function(record, next) { | |
| if (header) { | |
| // Ignore the header row. | |
| header = false; | |
| return next(); | |
| } | |
| next(null, { | |
| data: { | |
| propertyId: record[0], |
| .center-loader { | |
| font-size: 2em; | |
| position: absolute; | |
| left: 50%; | |
| top: 50%; | |
| margin-top: -0.5em; | |
| margin-left: -0.5em; | |
| } |
| angular.module('myApp') | |
| .controller('FormController', ['$scope', 'Formio', function($scope, Formio) { | |
| $scope.form = null; | |
| $scope.submission = {data: {}}; | |
| var formio = (new Formio('https://myproject.form.io/myform')); | |
| var getAutoIncrement = function(fieldName, cb) { | |
| formio.loadSubmissions({params: {sort: '-data.' + fieldName, limit: 1}}).then(function(subs) { | |
| var value = 0; | |
| if (subs.length) { |