A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Hot answers tagged


I used hook_field_widget_form_alter as suggested by DannyEnglander and leymannx. 8.8.x hook_field_widget_form_alter Replace MYMODULE with your custom module's name and alter the element array to suit your needs. /** * Implements hook_field_widget_form_alter(). */ function MYMODULE_field_widget_form_alter(&$element, \Drupal\Core\Form\...

Only top voted, non community-wiki answers of a minimum length are eligible