You are here

function tablefield_delete_table_values in TableField 7.3

Same name and namespace in other branches
  1. 6 tablefield.module \tablefield_delete_table_values()
  2. 7 tablefield.module \tablefield_delete_table_values()
  3. 7.2 tablefield.module \tablefield_delete_table_values()

Helper function to remove all values in a particular table.

Parameters

array $tablefield: The table as it appears in FAPI.

2 calls to tablefield_delete_table_values()
tablefield_import_csv in ./tablefield.module
Helper function to import data from a CSV file.
tablefield_import_pasted in ./tablefield.module
Helper function to import pasted data.

File

./tablefield.module, line 1953
Provides a set of fields that can be used to store tabular data with a node.

Code

function tablefield_delete_table_values(&$tablefield) {

  // Empty out previously entered values.
  foreach ($tablefield as $key => $value) {
    if (strpos($key, 'row_') === 0) {
      $tablefield[$key] = '';
    }
  }
}