Drupal 7, module Tablefield
after editing the item card - adds 1 empty table (and gives 2 errors
Notice: Undefined index: hide_headers in the tablefield_field_widget_form () function (line 607 in the /home/c/cv55565/timetrial/public_html/sites/all/modules/tablefield/tablefield.module file). Notice: Undefined index: hide_headers in the tablefield_field_widget_form () function (line 642 in the /home/c/cv55565/timetrial/public_html/sites/all/modules/tablefield/tablefield.module file).
if (!empty($instance['description'])) { $help_text = $instance['description']; } else { if ($field['settings']['hide_headers'] == TRUE) { $help_text = t('This table will not have a header.'); } else { $help_text = t('The first row will appear as the table header. Leave the first row blank if you do not need a header.'); } } $element['tablefield'] = array( '#title' => $element['#title'], '#description' => filter_xss_admin($help_text), '#attributes' => array( 'id' => $id, 'class' => array('form-tablefield'), ), '#type' => 'fieldset', '#tree' => TRUE, '#collapsible' => FALSE, '#prefix' => '<div id="' . $ajax_wrapper_id . '">', '#suffix' => '</div>', ); if (!empty($field['settings']['hide_headers'])) { $element['tablefield']['#attributes']['class'][] = 'table-no-headers'; } // Give the fieldset the appropriate class if it is required. if ($element['#required']) { $element['tablefield']['#title'] .= ' <span class="form-required" title="'; $element['tablefield']['#title'] .= t('This field is required'); $element['tablefield']['#title'] .= '">*</span>'; } $arg0 = arg(0); if ($arg0 == 'admin') { $element['tablefield']['#description'] = t('This form defines the table field defaults, but the number of rows/columns and content can be overridden.'); if (!$field['settings']['hide_headers']) { $element['tablefield']['#description'] .= ' ' . t('The first row will appear as the table header. Leave the first row blank if you do not need a header.'); } } I understand - it now swears at this
if (!$field['settings']['hide_headers']) { And precisely because of this empty tables