You are here

function tablefield_rebuild_form in TableField 7

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

Helper function to rebuild the table structure w/o submitting the form.

_state

Parameters

array $form:

1 string reference to 'tablefield_rebuild_form'
tablefield_field_widget_form in ./tablefield.module
Implements hook_widget_form().

File

./tablefield.module, line 579
This module provides a set of fields that can be used to store tabular data with a node. The implementation uses a custom CCK widget.

Code

function tablefield_rebuild_form($form, &$form_state) {

  // Maintain the tablefield data.
  $form_state['tablefield_rebuild'] = $form_state['input'];
  $form_state['rebuild'] = true;

  // Maintain the submitted node values. This is similar
  // to how the node preview works.
  if (isset($form['#node_edit_form'])) {
    $node = node_form_submit_build_node($form, $form_state);
  }
}