fields.optionsPair
Properties that Editor should use for label and values for options.
Please note - this property requires the Editor extension for DataTables.
The full Editor reference documentation is available to registered users of Editor - the information shown below is a summary only. If you already have an Editor license please sign-in, alternatively an Editor license can be purchased on this site, or sign up for the free trial.
Description
A number of field types made available by Editor have the ability to show a list of options to the end user. The built in types are:
The list of options can take a number of different formats (see the fields.options
documentation), with the most commonly used being an array of objects. Editor will, by default, look for value
and label
parameters in those objects, but you can control the parameters used though this option, which can be useful if you already have APIs with a set format that uses other parameters.
This is done by giving this option as an object that has value
and label
properties. The values given for each will be mapped to the value and label used by Editor.
Note that the datatable
field type does not make use of the label
property - only the value
.