function label_help_form_field_config_edit_form_alter in Label Help 8
Implements hook_form_FORM_ID_alter().
File
- ./
label_help.module, line 86 - This is the file description for the Label Help module.
Code
function label_help_form_field_config_edit_form_alter(&$form, &$form_state, $form_id) {
$fieldConfig = $form_state
->getFormObject()
->getEntity();
// Add settings for file upload widgets.
$form['settings']['label_help_description'] = array(
'#type' => 'textarea',
'#rows' => 2,
'#title' => t('Label help message'),
'#default_value' => $fieldConfig
->getThirdPartySetting('label_help', 'label_help_description'),
'#description' => t('Help text to insert below the label and above the input form element.'),
);
$form['#entity_builders'][] = 'label_help_form_field_config_edit_form_builder';
}