You are here

function paragraphs_table_field_widget_settings_form in Paragraphs table 7

Implements hook_field_widget_settings_form().

File

./paragraphs_table.module, line 456
Module file for Paragraph table module.

Code

function paragraphs_table_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  if ($widget['type'] == 'paragraphs_table') {
    $form['nodragging'] = array(
      '#type' => 'checkbox',
      '#title' => t('Disable drag and drop'),
      '#description' => t('If checked, users cannot rearrange the rows.'),
      '#default_value' => $settings['nodragging'],
    );
    $form['title_on_top'] = array(
      '#type' => 'checkbox',
      '#title' => t('Display title above table'),
      '#description' => t('If checked, field title will appear above the table.'),
      '#default_value' => $settings['title_on_top'],
    );
  }
  return $form;
}