1 text.module | text_field_settings_form($field, $instance, $has_data) |
Implements hook_field_settings_form().
File
- core/
modules/ field/ modules/ text/ text.module, line 62 - Defines simple text field types.
Code
function text_field_settings_form($field, $instance, $has_data) {
$settings = $field['settings'];
$form = array();
if ($field['type'] == 'text') {
$form['max_length'] = array(
'#type' => 'number',
'#title' => t('Maximum length'),
'#default_value' => $settings['max_length'],
'#required' => TRUE,
'#description' => t('The maximum length of the field in characters.'),
'#min' => 1,
'#max' => 1000000000,
'#disabled' => $has_data,
);
}
return $form;
}