Skip to content

Instantly share code, notes, and snippets.

View travist's full-sized avatar

Travis Tidwell travist

View GitHub Profile
@travist
travist / README.md
Last active May 11, 2017 01:30
Providing default form components to Form.io Form Builder
@travist
travist / Form.io Dependency Licenses
Created April 12, 2017 17:34
The licenses for the dependencies for Form.io
± |tag:v1.16.4 {6} ✓| → license-checker
├─ [email protected]
│ ├─ licenses: (MIT OR Apache-2.0)
│ ├─ repository: https://github.com/dominictarr/JSONStream
│ ├─ publisher: Dominic Tarr
│ ├─ email: [email protected]
│ ├─ url: http://bit.ly/dominictarr
│ └─ licenseFile: /Users/travistidwell/Documents/formio/modules/formio/node_modules/JSONStream/LICENSE.MIT
├─ [email protected]
│ ├─ licenses: ISC
@travist
travist / gist:dd5308ff4a1973db92f83ff57b97d93b
Created March 20, 2017 16:18
Form.io NGINX Configuration for Dev, Stage, and Prod
###
# 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 / {
@travist
travist / changepass.html
Created January 30, 2017 14:08
Reset Password Workflow with Form.io
<h3>Please provide your new password to reset your password.</h3>
<formio form="form"></formio>
@travist
travist / Dockerrun.config.json
Created January 26, 2017 21:22
Form.io AWS Docker Deployment Configuration
{
"AWSEBDockerrunVersion": "1",
"Authentication": {
"Bucket": "formio-docker",
"Key": ".dockercfg"
},
"Image": {
"Name": "formio/formio-server:latest",
"Update": "true"
},
@travist
travist / FormSubmissionController.js
Created January 23, 2017 17:58
Manual Form.io API
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) {
@travist
travist / transform.js
Created January 4, 2017 17:26
Transform address
var header = true;
module.exports = function(record, next) {
if (header) {
// Ignore the header row.
header = false;
return next();
}
next(null, {
data: {
propertyId: record[0],
@travist
travist / image.css
Last active December 7, 2016 02:48
Viewing images with Form.io
.center-loader {
font-size: 2em;
position: absolute;
left: 50%;
top: 50%;
margin-top: -0.5em;
margin-left: -0.5em;
}
@travist
travist / autoincrement.js
Last active December 2, 2016 14:26
Auto-incrementing value in Form.io
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) {
@travist
travist / embed.html
Created November 2, 2016 12:59
Form.io CodePen
<p data-height="600" data-theme-id="light" data-slug-hash="xVyMjo" data-default-tab="result" data-user="travist" data-embed-version="2" data-pen-title="Form.io Form Building and Rendering" class="codepen">See the Pen <a href="http://codepen.io/travist/pen/xVyMjo/">Form.io Form Building and Rendering</a> by Travis Tidwell (<a href="http://codepen.io/travist">@travist</a>) on <a href="http://codepen.io">CodePen</a>.</p>
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>