handleInputElement example

      // possible to rely on it in JavaScript.       $element['#attributes']['data-drupal-selector'] = Html::getId($element['#id']);
    }

    // Add the aria-describedby attribute to associate the form control with its     // description.     if (!empty($element['#description'])) {
      $element['#attributes']['aria-describedby'] = $element['#id'] . '--description';
    }
    // Handle input elements.     if (!empty($element['#input'])) {
      $this->handleInputElement($form_id$element$form_state);
    }
    // Allow for elements to expand to multiple elements, e.g., radios,     // checkboxes and files.     if (isset($element['#process']) && !$element['#processed']) {
      foreach ($element['#process'] as $callback) {
        $complete_form = &$form_state->getCompleteForm();
        $element = call_user_func_array($form_state->prepareCallback($callback)[&$element, &$form_state, &$complete_form]);
      }
      $element['#processed'] = TRUE;
    }

    
Home | Imprint | This part of the site doesn't use cookies.