You are here

function tablefield_field_settings_form in TableField 7.3

Same name and namespace in other branches
  1. 7 tablefield.module \tablefield_field_settings_form()
  2. 7.2 tablefield.module \tablefield_field_settings_form()

Implements hook_field_settings_form().

File

./tablefield.module, line 363
Provides a set of fields that can be used to store tabular data with a node.

Code

function tablefield_field_settings_form($field, $instance, $has_data) {
  $multiple_fields_remove_button_module = l(t('Multiple Fields Remove Button module'), 'https://www.drupal.org/project/multiple_fields_remove_button', array(
    'attributes' => array(
      'title' => t('Project page on Drupal.org'),
      'target' => '_blank',
    ),
  ));
  $manage_display = l(t('Manage display'), '/admin/structure/types/manage/' . $instance['bundle'] . '/display', array(
    'attributes' => array(
      'title' => t('More tablefield options'),
    ),
  ));
  $form = array();
  $form['message'] = array(
    '#markup' => t('If multiple values are allowed it is recommended to install and enable the !multiple_fields_remove_button_module. Additional TableField settings are available at !manage_display.', array(
      '!multiple_fields_remove_button_module' => $multiple_fields_remove_button_module,
      '!manage_display' => $manage_display,
    )),
    '#weight' => -100,
  );
  return $form;
}