{hero}

fields.id

Since: Editor 1.0

Field ID.
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 , alternatively an Editor license can be purchased on this site, or sign up for the free trial.

Description

This option sets the id attribute that is applied to the field's input elements. Each field type will use the id as appropriate for the field, but in its simplest case, the id is added as an attribute to the input element.

The field id's primary use in Editor is to improve accessibility as Editor will use the label element's for attribute with the id given here. The end result is that if you click on the label for a field, the browser will automatically give focus to that field's input control.

An assigned id can also be useful if you wish to add jQuery event handlers to specific elements, making it easy to target specific elements (note that node() and field().node() can also be useful when working with the DOM elements).

If no value is given for this option Editor will automatically use the fields.name parameter as the id, prefixed by DTE_Field_. For example, if a field has the name first_name, its automatically assigned id will be DTE_Field_first_name.