You are here

function social_event_max_enroll_field_widget_form_alter in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/modules/social_event_max_enroll/social_event_max_enroll.module \social_event_max_enroll_field_widget_form_alter()
  2. 10.3.x modules/social_features/social_event/modules/social_event_max_enroll/social_event_max_enroll.module \social_event_max_enroll_field_widget_form_alter()
  3. 10.1.x modules/social_features/social_event/modules/social_event_max_enroll/social_event_max_enroll.module \social_event_max_enroll_field_widget_form_alter()
  4. 10.2.x modules/social_features/social_event/modules/social_event_max_enroll/social_event_max_enroll.module \social_event_max_enroll_field_widget_form_alter()

Implements hook_field_widget_form_alter().

File

modules/social_features/social_event/modules/social_event_max_enroll/social_event_max_enroll.module, line 179
The Social Event Max Enroll module.

Code

function social_event_max_enroll_field_widget_form_alter(&$element, FormStateInterface $form_state, $context) {
  $field_definition = $context['items']
    ->getFieldDefinition();
  if ($field_definition
    ->getName() === 'field_event_max_enroll_num') {
    $element['value']['#title_display'] = 'none';
  }
}