You are here

function markup_field_settings_form in Markup 7

Implements hook_field_settings_form().

File

./markup.module, line 83
Defines a field type for displaying markup on the node/edit form.

Code

function markup_field_settings_form($field, $instance, $has_data) {
  $form = array();
  $settings = $field['settings'];
  $form['markup'] = array(
    '#type' => 'text_format',
    '#title' => t('Markup'),
    '#default_value' => isset($settings['markup']['value']) ? $settings['markup']['value'] : '',
    '#format' => isset($settings['markup']['format']) ? $settings['markup']['format'] : filter_default_format(),
    '#required' => TRUE,
    '#rows' => 15,
    '#description' => t('The markup to be displayed. Any HTML is legal here, so be careful not to break your page layout.'),
  );
  $form['instructions'] = array(
    '#markup' => htmlentities(t('This is a special field. It will output the markup below. Consider wrapping any visible output in <div class="form-item"></div> to follow form standards.')),
    '#weight' => -1,
  );
  return $form;
}