Check out new language_select element in Form API

Created on 4 September 2023, over 1 year ago

Problem/Motivation

Since D8, a New language_select element in the Form API exist.
Check out if this is functional for this module, leading to less code.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @johnv
  • Status changed to Closed: works as designed 2 months ago
  • 🇳🇱Netherlands johnv

    This is already considered. Thisis wah tLanguageSelectWigdet.php contains:

      public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state): array {
        ...
        $element['value'] = [
          // Using 'language_select' would add dependency on core Language module.
          '#type' => 'select',
          ...
        ];
    
        return $element;
      }
    
Production build 0.71.5 2024