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)

Text Fields

You can find all Text related fields here.

Dropdown

schema type : string, (and array for checkbox list in dropdown)
options type : select
more info

"type":"string", 
"enum": ["Vanilla", "Chocolate", "Coffee", "Strawberry", "Mint"]
"type": "select",
 "optionLabels": ["Vanille", "Chocolat", "Café", "Fraise", "Comme"],
"removeDefaultNone": true

Select2 (advanced)

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 for more detailed information.

Radio buttons

schema type : string, number
options type : radio
more info

Checkbox

schema type : boolean (and array for checkbox list)
options type : checkbox
more info

Url

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

Url2

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

Email

schema type : string
options type : email
more info

Date / Time

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

Image fields

see subpage

File (with instant upload and auto complete search)

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

"File": {
    "type": "file",
    "helper": "Url of the file",
    "typeahead": {
        "Folder": "Files"
    },
    "uploadfolder" : "Files",
    "downloadButton":true
}

File2 (based on select2)

"File": {
    "type": "file2",
    "filter":"^.*\.(jpg|JPG|gif|GIF|doc|DOC|pdf|PDF)$",
    "folder":"Files",
    "showFileUpload":true,
    "showUrlUpload":true  
}

Folder2 (based on select2)

"Folder": {
    "type": "folder2",
    "filter":"",
    "folder":"Files"
}

List of items

schema type : array
options type : array
more info

Table of items

schema type : array
options type : table
more info

Accordion

schema type : array
options type : accordion

885

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

"myfield": {
  "type": "accordion",        
  "titleField": "fieldname" 
}

inherit from array more info on array

Dependency between fields

Dependencies
Conditional Dependencies

Multi-Lingual Field types

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

"ProductName": {
   "title": "Product name",
   "type": "mltext"
}

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

Icon Field

schema type : string
options type : icon

"Icon": {
   "title": "Icon",
   "type": "string"
}
"Icon": {                        	
	"type": "icon",
  "glyphicons" : false,
  "fontawesome" : true          
}

User2 Field

"User": {
   "title": "User",
   "type": "string"
}
"User": {                        	
	"type": "user2",
  "lazyLoading" : false,
  "role" : "Editor"          
}

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