Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Wiederhergestellt aus Version 7

...

Format

Configuration example

Description

Date

Code Block
languagejson
"myDate": {
  "type": "string",
  "format": "date"
}

Meant for a single date.
Shows-up as date picker in the form.

Image RemovedImage Added

Text

Code Block
languagejson
"myText": {
  "type": "string"
}

Meant for small amount of text.
Shows-up as single-line input field in the form.

Single-List

Code Block
languagejson
"mySingleList": {
  "type": "string",
  "enum":["male", "female"]
}

Meant for lists where only one element can be selected from.
Shows-up as single-select drop-down in the form.

Multi-List

Code Block
languagejson
"someMultiList": {
  "type": "array",
  "items": {
    "type": "string",
    "enum": ["item1", "item2"]
  }
}

Meant for lists where multiple elements can be selected from.
Shows-up as multi-select drop-down in the form.

Yes/No

Code Block
languagejson
"myYesNo": {
  "type": "boolean"
}

Meant for yes/no (true/false) values.
Shows-up as checkbox in the form.
You can set the attribute "render":"button" in the form config in order to display this as a clickable button instead of a checkbox.

Number

Code Block
languagejson
"myNumber": {
  "type": "number"
}

Meant for number values.
Shows-up as number field in the form.

File

Code Block
languagejson
"myFile": {
  "type": "object",
  "properties": {
    "filename": 
      {"type": "string"},
    "contentLength": 
      {"type": "number"},
    "contentType": 
      {"type": "string"},
    "contentEncoding": 
      {"type": "string"},
    "content": 
      {"type": "string"}
  }  
}

Meant for file attachments to an object.
In order to show-up in a form correctly, additionally you need to configure the layout and set "render":"filepicker" or "render":"pdfpreview" in the form configuration.