Skip to content

Instantly share code, notes, and snippets.

@rossrowe
rossrowe / simpleSuggestExample.groovy
Created April 25, 2013 08:56
Demonstrates how to define a Good Form field which invokes the Simple Suggestions plugin
question("Q2") {
"What is your favorite colour?" text: 20, suggest: "colour", map: 'faveColour'
}
@rossrowe
rossrowe / headingExample.groovy
Created April 25, 2013 05:50
Demonstrates how to add a GoodForm 'heading'
question("G1") {
"Important" heading: 1
}
@rossrowe
rossrowe / datetimeExample.groovy
Last active December 16, 2015 15:39
Demonstrates how to define a GoodForm 'datetime' field
question("G1") {
"Delivery Date" datetime: 'dd/MM/yyyy', min: 'today', map: 'deliveryDate'
}
@rossrowe
rossrowe / dateExample.groovy
Created April 25, 2013 05:25
Demonstrates how to define a GoodForm 'date' field
question("G1") {
"Date of Birth" date: 'd/M/yyyy', map: 'dob'
}
@rossrowe
rossrowe / textExample.groovy
Created April 25, 2013 05:23
Demonstrates how to define a GoodForm 'text' field
question("G1") {
"Surname" text: 10, map: 'surname'
}
@rossrowe
rossrowe / attachmentExample.groovy
Created April 25, 2013 05:11
Demonstrates how to define a GoodForm 'attachment'
question("G1") {
"Attach any other documentation" attachment: 'otherDocuments'
}
@rossrowe
rossrowe / phoneExample.groovy
Created April 25, 2013 05:07
Demonstrates how to define a GoodForm 'phone' field
question("G1") {
"Phone Number" phone: 15, map: 'phone'
}
@rossrowe
rossrowe / numberExample.groovy
Created April 25, 2013 05:06
Demonstrates how to define a GoodForm 'number
question("G1") {
"Reference Number" number: 10, hint: "Enter your reference number", map: 'refno'
}
@rossrowe
rossrowe / moneyExample.groovy
Created April 25, 2013 05:03
Demonstrates how to define a GoodForm 'money' field
question("G2") {
"Salary" money: 10, hint: "What is your current salary?", map: 'salary'
}
@rossrowe
rossrowe / groupExample.groovy
Created April 25, 2013 05:00
Demonstrates how to define a GoodForm 'group'
question("G2") {
"What is your name?" group: "names", hint: "Name of the person requiring assistance", {
"Title" text: 10, hint: "e.g. Mr, Mrs, Ms, Miss, Dr", suggest: "title", map: 'title'
}
}