Apache Sling > Sling CMS > Developers > Editor Field Types
The following editor field types are available in Sling CMS under the path /libs/sling-cms/components/editor/fields
:
Renders a button.
Resource Type: sling-cms/components/editor/fields/button
Properties
- onclick - a Javascript method to execute when the button is clicked
- label - the text for the button
Renders multiple file upload fields.
Resource Type: sling-cms/components/editor/fields/file
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- accepts - the mime types accepted by the field, the default are: image/,audio/,video/,application/json,text/css,application/pdf*
Hidden
Renders a hidden field
Resource Type: sling-cms/components/editor/fields/hidden
Properties
- name - the name attribute for the field
- value - the value of the hidden field
Renders a path picker. Currently this uses HTML5 data lists to display the dropdown of available paths.
Resource Type: sling-cms/components/editor/fields/path
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- additionalParams - any additional parameters to append to the query for further filtering
- basePath - the path under which to search, by default
/content
- titleProperty - the property to retrieve a title for the result
- type - the node type to limit the results, by default
nt:hierarchyNode
Renders a repeating set of fields.
Resource Type: sling-cms/components/editor/fields/repeating
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- type - the type of field to render
Renders a rich text editor using Summernote.
Resource Type: sling-cms/components/editor/fields/richtext
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
Renders a select field. This field can either specify a list of options in a property, as a subnode or use a script to render the options.
Resource Type: sling-cms/components/editor/fields/select
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- multiple - if set to true the field will allow multiple options to be selected
- options - if set, this will be used to populate the options for the select field. These should be and array of strings in the format
{LABEL}={VALUE}
- optionsScript - the absolute path to a script to execute to get the select options
Renders taxonomy selection field.
Resource Type: sling-cms/components/editor/fields/taxonomy
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- basePath - the path under which to search, by default
/etc/taxonomy
Renders an input field.
Resource Type: sling-cms/components/editor/fields/text
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- defaultValue - the default value for the field if no value has been saved already
- type - the type of input field, by default this is
text
Renders a textarea
Resource Type: sling-cms/components/editor/fields/textarea
Properties
- disabled - if set to true the field will be disabled
- label - the label text for the field
- name - the name attribute for the field
- required - if set to true the field will be required
- defaultValue - the default value for the field if no value has been saved already