Context variable for hook_field_widget_complete_form_alter does not contain "delta" property

Created on 2 September 2025, about 1 month ago

API page: https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php...

Enter a descriptive title (above), then describe the problem you have found:

The documentation about hook is not 100% accurate, the variable context doesn't contain the property delta for hook_field_widget_complete_form_alter. It could be seen here https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Field%21W... that in the class that triggers the hook, the property delta is not set: see https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...

For the hook_field_widget_single_element_form the context is correct though

📌 Task
Status

Active

Version

11.0 🔥

Component

documentation

Created by

🇩🇪Germany a.dmitriiev

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

Comments & Activities

Production build 0.71.5 2024