Skip to end of metadata
Go to start of metadata

 

Form Layout Description

Start of Form Declaration 

type: "object",
title: "Your Form Data",
properties: {

Declare the form is an object.
Optional title for the form
Start point for declaring the form properties (e.g., its fields)

startdate: {
title: "Start Date",
propertyOrder: 1,
type: "string",
format: "date",
description: "Start date for workflow"
},
Declare a specific property - i.e., startdate.
Optional title/label for the property
Optional order of the property against the other properties in the form
Type of property
Optional format of the property. In this case a date
Optional description to display of the property
Closing

to_address: {
title: "Mail To",
propertyOrder: 2,
type: "string",
description: "Support email address"
},

 

time_expression: {
title: "Time Expression",
propertyOrder: 3,
type: "string",
description: "Time expression for workflow scheduled firings"
},

 
 comment: {

title: "Comment",
propertyOrder: 4,
type: "string",
min_length: 4,
default: "Enter a comment here",
description: "Describe the purpose of this schedule"
},

  Notice the test for a minimum length (min_length)

integer: {
title: "Integer",
propertyOrder: 4,
type: "integer",
minimum: 0,
maximum: 99,
options: { input_width: "100px" },
description: "Value with a range of 0-99 and restricted display width"
},

 Notice the test for a minimum and maximum. 0 and 99 are included as valid values.




Here we limit the displayed length of the property using input_width

 gender: {

type: "string",
description: "Demonstrates a drop down list",
enum: [ male, female ]
},

 
 checkbox: {

type: "array",
format: "checkbox",
uniqueItems: true,
items: {
type: "string",
enum: ["male", "female"]
},
description: "Demonstrates check box selection"
},

 
 date: {

title: "Date",
propertyOrder: 4,
type: "string",
format: "date",
description: "Demonstrates a date selection"
}

 
 }Close out the properties for this form
}Close out the form

Sample Forms

Specify some form properties

{
	"type": "object",
	"title": "Your Form Data",
	"properties": {
		"formTitle": {
			"title": "Form Title",
			"propertyOrder": 1,
			"type": "string",
			"format": "string"
		},
		"formProperties": {
			"title": "List of Form Properties",
			"propertyOrder": 2,
			"options": {
				"collapsed": false
			},
			"type": "array",
			"items": {
				"title": "Form Property",
				"type": "object",
				"format": "grid",
				"properties": {
					"name": {
						"title": "Name",
						"type": "string"
					},
					"title": {
						"title": "Label",
						"type": "string"
					},
					"type": {
						"title": "Type",
						"type": "string"
					},
					"format": {
						"title": "Format",
						"type": "string"
					},
					"description": {
						"title": "Description",
						"type": "string"
					},
					"default": {
						"title": "Default",
						"type": "string"
					}
				}
			}
		}
	}
}

An Error Report Form

{
  "type": "object",
  "title": "Error Reporting Form",
  "properties": {
    "reporterEmail": {
      "title": "Reporter Email Address",
      "propertyOrder": 1,
      "type": "string",
      "description": "Your email address"
    },
    "error": {
      "title": "Error Description",
      "propertyOrder": 2,
      "type": "string",
      "format": "textarea",
      "description": "Describe the error"
    }
  }
}

A Request Approval Form

{
  "type": "object",
  "title": "Request Approval Form",
  "properties": {
    "Request": {
      "title": "Request",
      "propertyOrder": 2,
      "type": "string",
      "format": "textarea",
      "description": "Request description"
    },
    "approval": {
      "title": "Approve?",
      "propertyOrder": 8,
      "type": "array",
      "format": "checkbox",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "Approve",
          "Disapprove"
        ]
      }
    }
  }
}

Specify a Command to Execute

{
  "type": "object",
  "title": "Command to Execute",
  "properties": {
    "command": {
      "title": "Specify a Command to Execute",
      "propertyOrder": 1,
      "type": "string",
      "default": "dir c:\\",
      "description": "Batch or OS Command to execute"
    }
  }
}

Request a Value

{
  "type": "object",
  "title": "Enter some value to echo to console",
  "properties": {
    "VARNAME": {
      "title": "Specify a value to echo to console",
      "propertyOrder": 1,
      "type": "string",
      "default": "My Variable is Flux",
      "description": "Text to place into the variable"
    }
  }
}

Salary Processing Data Entry

{
  "type": "object",
  "title": "Salary Increase",
  "properties": {
    "department": {
      "title": "Department Id",
      "propertyOrder": 1,
      "type": "string",
      "enum": [
        "Administration",
        "Athletics",
        "Deans"
      ],
      "description": "Select a department"
    },
    "increase": {
      "title": "Salary Increase %",
      "propertyOrder": 1,
      "type": "number",
      "minimum": 0,
      "maximum": 50,
      "description": "Specify the salary increase %"
    },
    "criteria": {
      "title": "Performance Criteria",
      "propertyOrder": 1,
      "type": "string",
      "format": "textarea",
      "default": "Meets expectations",
      "description": "Specify the performance criteria"
    },
    "criteria_met": {
      "title": "Performance Criteria Met?",
      "propertyOrder": 1,
      "type": "boolean",
      "format": "checkbox",
      "default": true
    }
  }
}
  • No labels