Skip to content
This repository has been archived by the owner on May 2, 2019. It is now read-only.
nickjackson edited this page Dec 11, 2012 · 4 revisions

Spec

Specification for the JSON Schema to create dynamic forms. A work in progress.

Data Types

  • String
  • Number
  • Date
  • Boolean
  • Object

Controls

Use the following schemas to create a ...

Text Input

username: {
	title: "Username",
	type: "String"
}

Select

gender: {
	title: "Gender",
	type: "String",
	options: {
		male: "Male",
		female: "Female"
	}
}

Checkbox

subscribe: {
	title: "Subscribe to our newsletter",
	type: "Boolean",
	default: "true"
}

Select for Date

Renders 3 Selects, DD MM YYYY

published: {
	title: "Date Published",
	type: "Date"
}

SubSchemas

SubSchemas are to be used when you wish to group certain properties under another. For example, you may wish to group first and last names of an author.

favAuthor: {
	title: "Favourite Author",
	type: "Object",
	properties: {
		forename: {
			title: "Forename",
			type: "String"
		},
		surname: {
			title: "Surname",
			type: "String"
		}
	}
}
Clone this wiki locally