You are here

function paragraphs_table_field_widget_form in Paragraphs table 7

Implements hook_field_widget_form().

File

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

Code

function paragraphs_table_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  switch ($instance['widget']['type']) {
    case 'paragraphs_table':
      $instance['widget']['type'] = 'field_paragraphs_embed';
      $element = paragraphs_field_multiple_value_form($field, $instance, $langcode, $items, $form, $form_state, $delta, $element);
      break;
  }
  return $element;
}