field().label()

Since: Editor 1.3

Get / set the label for a field. 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

The field label is the primary piece of information that tells the end user what the data in the field they are entering represents. This is normally as simple as a one or two word string, but can be arbitrarily complex as your form demands. Because of its importance, it is vital that the label be both relevant and concise, and this method provides the ability to modify, or get, the label's value.

The default value can be set when it is initially added to the form using the fields.label option or the label option of the field-options object given to add() when dynamically creating a field. This API method extends that ability by providing a method to set the label value at any point after a field has been added to the form.