Namespace: form

Drupal.quickedit.util.form

Methods

(static) ajaxifySaving(options, $submit) → {Drupal.Ajax}

Creates a Drupal.Ajax instance that is used to save a form.

Parameters:
Name Type Description
options object

Submit options to the form.

Properties
Name Type Description
nocssjs bool

Boolean indicating whether no CSS and JS should be returned (necessary when the form is invisible to the user).

other_view_modes Array.<string>

Array containing view mode IDs (of other instances of this field on the page).

$submit jQuery

The submit element.

Source:
Returns:

A Drupal.Ajax instance.

Type
Drupal.Ajax

(static) load(options, callback)

Loads a form, calls a callback to insert.

Leverages Drupal.Ajax' ability to have scoped (per-instance) command implementations to be able to call a callback.

Parameters:
Name Type Description
options object

An object with the following keys:

Properties
Name Type Description
fieldID string

The field ID that uniquely identifies the field for which this form will be loaded.

nocssjs bool

Boolean indicating whether no CSS and JS should be returned (necessary when the form is invisible to the user).

reset bool

Boolean indicating whether the data stored for this field's entity in PrivateTempStore should be used or reset.

callback function

A callback function that will receive the form to be inserted, as well as the ajax object, necessary if the callback wants to perform other Ajax commands.

Source:

(static) unajaxifySaving(ajax)

Cleans up the Drupal.Ajax instance that is used to save the form.

Parameters:
Name Type Description
ajax Drupal.Ajax

A Drupal.Ajax instance that was returned by Drupal.quickedit.form.ajaxifySaving.

Source: