edit()

Since: Editor 1.0

Edit an item using the main editing display. 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 method is used to edit one or more items, optionally showing the edit form to the end user, providing them with the ability to modifying field values, or the form can be submitted programmatically without user intervention.

As of v1.5 Editor supports the ability to edit the values for one or more rows simultaneously by passing a suitable row-selector option in as the first parameter to this method. Furthermore, it is possible to use column-selector and cell-selector selectors to edit all values in a column or individual cells using the object form of this option as detailed below. Finally, row, column and cell selectors can all be used simultaneously to provide complex editing options should you wish to utilise this ability in Editor.

When called, this method will set field values in the form to the record's current values automatically. If a field does not have a current value (specifically that it is not undefined), its value in the editing interface will be set to the default value as set by fields.def.

This method has two different styles of being called (see above). Editor will automatically detect which method is used and act accordingly. Although the newer style introduced in Editor 1.3 is preferred for its flexibility, the older style is still retained for backwards compatibility and can continue to be used.