---
agentTools:
  projectIndex: https://opencontent.readme.io/llms.txt
---

# Field types

Field types in edit and template settings forms

The definition of field is partially in schema.json (data definition) and partially in options.json (ui definition)

[block:api-header]
{
  "type": "basic",
  "title": "Text Fields"
}
[/block]

You can find all Text related fields [here](text-fields).

[block:api-header]
{
  "type": "basic",
  "title": "Dropdown"
}
[/block]

**schema type** : string, (and array for checkbox list in dropdown)
**options type** : select
[more info](http://www.alpacajs.org/docs/fields/select.html)

[block:code]
{
  "codes": [
    {
      "code": "\"type\":\"string\", \n\"enum\": [\"Vanilla\", \"Chocolate\", \"Coffee\", \"Strawberry\", \"Mint\"]",
      "language": "json",
      "name": "schema.json"
    },
    {
      "code": " \"type\": \"select\",\n \"optionLabels\": [\"Vanille\", \"Chocolat\", \"Café\", \"Fraise\", \"Comme\"],\n\"removeDefaultNone\": true",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Select2 (advanced)"
}
[/block]

**schema type** : string, (and array for checkbox list in dropdown)
**options type** : select2

Select2 is a dropdown that can get his items from a webapi call thu serviceFramemork

see [Select2](https://opencontent.readme.io/docs/select2) for more detailed information.

[block:api-header]
{
  "type": "basic",
  "title": "Radio buttons"
}
[/block]

**schema type** : string, number
**options type** : radio
[more info](http://www.alpacajs.org/docs/fields/radio.html)

[block:api-header]
{
  "type": "basic",
  "title": "Checkbox"
}
[/block]

**schema type** : boolean (and array for checkbox list)
**options type** : checkbox
[more info](http://www.alpacajs.org/docs/fields/checkbox.html)

[block:api-header]
{
  "type": "basic",
  "title": "Url"
}
[/block]

(textbox with auto complete search in dnn pages, results in a url-string)
schema type : string
options type : url
dnn specific

[block:api-header]
{
  "title": "Url2"
}
[/block]

(textbox with auto complete search in dnn pages, results in a tabid)
schema type : string
options type : url2
dnn specific

[block:api-header]
{
  "type": "basic",
  "title": "Email"
}
[/block]

**schema type** : string
**options type** : email
[more info](http://www.alpacajs.org/docs/fields/email.html)

[block:api-header]
{
  "title": "Date / Time"
}
[/block]

**schema type** : string
**options type** : date
**options** : "dateformat": "DD-MM-YYYY" (or any other .NET date time format)

[block:api-header]
{
  "type": "basic",
  "title": "Image fields"
}
[/block]

see [subpage](https://opencontent.readme.io/docs/image-fields-1)

[block:api-header]
{
  "type": "basic",
  "title": "File (with instant upload and auto complete search)"
}
[/block]

**schema type** : string
**options type** : file
Uploaded files are stored in : /Portals/\[portalid]/OpenContent/Files

[block:code]
{
  "codes": [
    {
      "code": " \"File\": {\n    \"type\": \"file\",\n    \"helper\": \"Url of the file\",\n    \"typeahead\": {\n        \"Folder\": \"Files\"\n    },\n    \"uploadfolder\" : \"Files\",\n    \"downloadButton\":true\n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "File2 (based on select2)"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "\"File\": {\n    \"type\": \"file2\",\n    \"filter\":\"^.*\\.(jpg|JPG|gif|GIF|doc|DOC|pdf|PDF)$\",\n    \"folder\":\"Files\",\n    \"showFileUpload\":true,\n    \"showUrlUpload\":true  \n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Folder2 (based on select2)"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "\"Folder\": {\n    \"type\": \"folder2\",\n    \"filter\":\"\",\n    \"folder\":\"Files\"\n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "List of items"
}
[/block]

schema type : array
options type : array
[more info](http://www.alpacajs.org/docs/fields/array.html)

[block:api-header]
{
  "type": "basic",
  "title": "Table of items"
}
[/block]

**schema type** : array
**options type** : table
[more info](http://www.alpacajs.org/docs/fields/table.html)

[block:api-header]
{
  "title": "Accordion"
}
[/block]

**schema type** : array
**options type** : accordion

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/a489dcb-accordionfield.JPG",
        "accordionfield.JPG",
        885,
        683,
        "#f2f2f2"
      ]
    }
  ]
}
[/block]

titleField : a fieldname of the items shows in the accoreon used as title of the accordeon

[block:code]
{
  "codes": [
    {
      "code": "\"myfield\": {\n  \"type\": \"accordion\",        \n  \"titleField\": \"fieldname\" \n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

inherit from array [more info on array](http://www.alpacajs.org/docs/fields/array.html)

[block:api-header]
{
  "type": "basic",
  "title": "Dependency between fields"
}
[/block]

[Dependencies](http://www.alpacajs.org/docs/api/dependencies.html)
[Conditional Dependencies](http://www.alpacajs.org/docs/api/conditional-dependencies.html)

[block:api-header]
{
  "type": "basic",
  "title": "Multi-Lingual Field types"
}
[/block]

To support multi-lingual scenario's you can use the ML variant of certain fields.
In doing so you will be presented with the possibility to add the content in the different activated languages (even if content localization is still disabled)
Currently the following field types have a multi-lingual variant:

**Multi lingual Text**
schema type : string
options type : mltext

[block:code]
{
  "codes": [
    {
      "code": "\"ProductName\": {\n   \"title\": \"Product name\",\n   \"type\": \"mltext\"\n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

**Multi lingual CKeditor**
schema type : string
options type : mlckeditor

**Multi lingual wysihtml**
schema type : string
options type : mlwysihtml

**Multi lingual url**
schema type : string
options type : mlurl

**Multi lingual Image**
schema type : string
options type : mlimage

**Multi lingual File**
schema type : string
options type : mlfile

[block:api-header]
{
  "type": "basic",
  "title": "Icon Field"
}
[/block]

**schema type** : string
**options type** : icon

[block:code]
{
  "codes": [
    {
      "code": " \"Icon\": {\n   \"title\": \"Icon\",\n   \"type\": \"string\"\n}",
      "language": "json",
      "name": "schema.json"
    },
    {
      "code": "\"Icon\": {                        \t\n\t\"type\": \"icon\",\n  \"glyphicons\" : false,\n  \"fontawesome\" : true          \n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "User2 Field"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": " \"User\": {\n   \"title\": \"User\",\n   \"type\": \"string\"\n}",
      "language": "json",
      "name": "schema.json"
    },
    {
      "code": "\"User\": {                        \t\n\t\"type\": \"user2\",\n  \"lazyLoading\" : false,\n  \"role\" : \"Editor\"          \n}",
      "language": "json",
      "name": "options.json"
    }
  ]
}
[/block]

role : filter users on role
**Note:** If you need to select multiple roles, in schema.json, set `"type": "array"`.