You are here

function tablefield_delete_table_values in TableField 6

Same name and namespace in other branches
  1. 7.3 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:

1 call to tablefield_delete_table_values()
tablefield_import_csv in ./tablefield.module
Validation function to help import data from a CSV file

File

./tablefield.module, line 518
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_delete_table_values(&$tablefield) {

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