Class: form

Drupal.quickedit.editors. form

new Drupal.quickedit.editors.form()




Tracks form container DOM element that is used while in-place editing.


Holds the Drupal.Ajax object.


Returns the edited element.

For some single cardinality fields, it may be necessary or useful to not in-place edit (and hence decorate) the DOM element with the data-quickedit-field-id attribute (which is the field's wrapper), but a specific element within the field's wrapper. e.g. using a WYSIWYG editor on a body field should happen on the DOM element containing the text itself, not on the field wrapper.

Type Description
jQuery A jQuery-wrapped DOM element.

inherited getQuickEditUISettings(){object}

Type Description
object Returns 3 Quick Edit UI settings that depend on the in-place editor:
  • Boolean padding: indicates whether padding should be applied to the edited element, to guarantee legibility of text.
  • Boolean unifiedToolbar: provides the in-place editor with the ability to insert its own toolbar UI into Quick Edit's tightly integrated toolbar.
  • Boolean fullWidthToolbar: indicates whether Quick Edit's tightly integrated toolbar should consume the full width of the element, rather than being just long enough to accommodate a label.

Loads the form for this field, displays it on top of the actual field.

Removes the form for this field, detaches behaviors and event handlers.

Cleans up validation error messages.

Should be called when the state is changed to 'candidate' or 'saving'. In the case of the latter: the user has modified the value in the in-place editor again to attempt to save again. In the case of the latter: the invalid value was discarded.

Reverts the modified value to the original, before editing started.

Saves the modified value in the in-place editor for this field.

Shows validation error messages.

Should be called when the state is changed to 'invalid'.

Determines the actions to take given a change of state.

Name Type Description
fieldModel Drupal.quickedit.FieldModel

The quickedit FieldModel that holds the state.

state string

The state of the associated field. One of Drupal.quickedit.FieldModel.states.