fields.name

Since: Editor 1.0

Unique name of the field - sent to the server on form submission. 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

When a form is submitted to the server for processing and storage, the server needs to be able to uniquely identify each field, and the value that the field will then take. This option provides that ability to set the field name that is used to submit to the server. It is also typically the parameter name that is used as the data source for the field from the source data for the row / form, although fields.data does provide the ability to alter that.

This is the only required parameter for a field (although you will typically want to use fields.label as well to set a user readable label) and Editor will throw an error if it is not provided. It must also be unique in the Editor instance (i.e. two fields cannot share the same name). Again, if this requirement is not met, Editor will throw an error.

As well as having an effect on fields.data, this option can also effect fields.id. If no values are provided for those options, Editor will assign values for them automatically based on this parameter.