You are here

function tablefield_field_settings_form in TableField 7.2

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

Implements hook_field_settings_form().

File

./tablefield.module, line 239
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) {
  $form = array();
  $form['restrict_rebuild'] = array(
    '#type' => 'checkbox',
    '#title' => t('Restrict rebuilding to users with the permission "rebuild tablefield"'),
    '#default_value' => isset($field['settings']['restrict_rebuild']) ? $field['settings']['restrict_rebuild'] : FALSE,
  );
  $form['lock_values'] = array(
    '#type' => 'checkbox',
    '#title' => t('Lock table header so default values cannot be changed.'),
    '#default_value' => isset($field['settings']['lock_values']) ? $field['settings']['lock_values'] : FALSE,
  );
  $form['cell_processing'] = array(
    '#type' => 'radios',
    '#title' => t('Table cell processing'),
    '#default_value' => isset($field['settings']['cell_processing']) ? $field['settings']['cell_processing'] : 0,
    '#options' => array(
      t('Plain text'),
      t('Filtered text (user selects input format)'),
    ),
  );
  $form['default_message'] = array(
    '#type' => 'markup',
    '#value' => t('To specify a default table, use the "Default Value" above. There you can specify a default number of rows/columns and values.'),
  );
  return $form;
}