You are here

function _unique_field_ajax in Unique field ajax 2.x

Same name and namespace in other branches
  1. 8 unique_field_ajax.module \_unique_field_ajax()

Callback for process.

Parameters

array $form: Form array.

\Drupal\Core\Form\FormStateInterface $form_state: FormState.

Return value

mixed Return nested array.

1 string reference to '_unique_field_ajax'
_unique_field_ajax_process in ./unique_field_ajax.module
Attach ajax to unique field.

File

./unique_field_ajax.module, line 239
Unique value for cck fields check module.

Code

function _unique_field_ajax(array &$form, FormStateInterface $form_state) {
  $element = $form_state
    ->getTriggeringElement();
  return NestedArray::getValue($form, $element['#array_parents']);
}