function static_field_field_instance_settings_form in Static field 7
Implements hook_field_instance_settings_form().
File
- ./
static_field.module, line 29 - Static field main module file.
Code
function static_field_field_instance_settings_form($field, $instance) {
$settings = $instance['settings'];
$form = array();
$form['text'] = array(
'#type' => 'text_format',
'#title' => t('Static field content'),
'#default_value' => $settings['text']['value'],
'#format' => $settings['text']['format'],
'#required' => TRUE,
'#description' => t('The static field text to display in this instance of field.'),
);
$form['form_display'] = array(
'#type' => 'radios',
'#title' => t('Display also in form'),
'#description' => t("Select how the static content will be displayed in the edit form."),
'#default_value' => $settings['form_display'],
'#options' => array(
FALSE => t('No'),
'markup' => t('Yes. No label'),
'item' => t('Yes. Display also the label'),
),
);
return $form;
}