Entry

Entry

Class representing an entry from Contentstack UI. Not available for Dashboard Widget extension.

Members

content_type :Object

Source:
Gets the content type of the current entry.
Type:
  • Object

locale :string

Source:
Gets the locale of the current entry.
Type:
  • string

Methods

getData() → {Object}

Source:
Gets data of the current entry.
Returns:
Returns entry data.
Type
Object

getField(uid) → {Object}

Source:
Gets the field object which allows you to interact with the field. This object will have all the same methods and properties of extension.field except for field.setData().
Example
var field = entry.getField('field_uid');
var fieldSchema = field.schema;
var fieldUid = field.uid;
var fieldData = field.getData();
Parameters:
Name Type Description
uid string Unique ID of the field
Returns:
Field object
Type
Object

onSave(callback)

Source:
This function executes the callback function every time an entry is saved.
Parameters:
Name Type Description
callback function The function to be called when an entry is saved.