Custom Editors

When editing data in the admin site, each field in the record includes a caption and a form input of one type or another. For instance, a boolean field may include an html checkbox input. These form input are called editors, and you can create your own for content editors to use.

An editor is a type of addon that accepts the following values as input and creates it's own html form input. The values are read using the cp.doc.getProperty( "fieldname" ) methods which also include getBoolean, getInteger, etc.

editorName

The name used for the html input field

editorValue

The value of the input field used for prepopulating the input.

editorFieldId

The id of the ccField record that describes this field. (version 4.1.608)

editorRecordId

The id of the record being edited. 0 for new records (version 4.1.621)

editorContentId

The content id of the record being edited. (version 4.1.621)

editorReadOnly

(optional) When cp.doc.getBoolean( "editorReadOnly" ) returns true, the field should display read-only and it's form value will not be saved if the form is submitted.