BaseEntitySheet

BaseEntitySheet

Extend the FormApplication pattern to incorporate specific logic for viewing or editing Entity instances. See the FormApplication documentation for more complete description of this interface.

Constructor

new BaseEntitySheet(object, optionsopt)

Source:
Parameters:
Name Type Attributes Description
object Entity

An Entity which should be managed by this form sheet.

options Object <optional>

Optional configuration parameters for how the form behaves.

Extends

Members

editors :Object

Source:
Overrides:

Keep track of any mce editors which may be active as part of this form The values of this Array are inner-objects with references to the MCE editor and other metadata

Type:
  • Object

entity :Entity

Source:

A convenience accessor for the object property, which in the case of a BaseEntitySheet is an Entity instance.

Type:

filepickers :Array

Source:
Overrides:

Keep track of any FilePicker instances which are associated with this form The values of this Array are inner-objects with references to the FilePicker instances and other metadata

Type:

form :HTMLElement

Source:
Overrides:

A convenience reference to the form HTMLElement

Type:
  • HTMLElement

isEditable :boolean

Source:
Overrides:

Is the Form Application currently editable?

Type:
  • boolean

object :*

Source:
Overrides:

The object target which we are using this form to modify

Type:
  • *

Methods

(async) _render()

Source:
Inherited From:

(async) _renderInner()

Source:
Inherited From:

(async, abstract) _updateObject(event, formData) → {Promise}

Source:
Overrides:

This method is called upon form submission after form data is validated

Parameters:
Name Type Description
event Event

The initial triggering submission event

formData Object

The object of validated form data with which to update the object

Returns:

A Promise which resolves once the update operation has completed

Type
Promise

activateListeners(html)

Source:
Overrides:

Activate the default set of listeners for the Entity sheet These listeners handle basic stuff like form submission or updating images

Parameters:
Name Type Description
html JQuery

The rendered template ready to have listeners attached

(async) close() → {Promise}

Source:
Overrides:

Extend the logic applied when the application is closed to destroy any remaining MCE instances This function returns a Promise which resolves once the window closing animation concludes

Parameters:
Name Type Description
options.submit boolean

Explicitly specify whether or not to submit the form when closing. Default behavior uses the value of FormApplication.options.submitOnClose.

Returns:
Type
Promise

getData()

Source:
Overrides:

submit(updateData) → {FormApplication}

Source:
Overrides:

Submit the contents of a Form Application, processing its content as defined by the Application

Parameters:
Name Type Description
updateData Object | null

Additional data updates to submit in addition to those parsed from the form

Returns:

Return a self-reference for convenient method chaining

Type
FormApplication