function label_length_limit_form_field_config_edit_form_alter in Override label length limititation 8
Same name and namespace in other branches
- 2.0.x label_length_limit.module \label_length_limit_form_field_config_edit_form_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
label_length_limit.module, line 31 - Contains label_length_limit.module.
Code
function label_length_limit_form_field_config_edit_form_alter(&$form, &$form_state, $form_id) {
if (isset($form['label'])) {
$config = \Drupal::config('label_length_limit.labellengthlimit');
$label_max_length = $config
->get('label_max_length');
$form['label']['#maxlength'] = $label_max_length;
}
}