function tablefield_delete_table_values in TableField 7
Same name and namespace in other branches
- 6 tablefield.module \tablefield_delete_table_values()
- 7.3 tablefield.module \tablefield_delete_table_values()
- 7.2 tablefield.module \tablefield_delete_table_values()
Helper function to remove all values in a particular table
Parameters
array $tablefield:
2 calls to tablefield_delete_table_values()
- tablefield_field_widget_form in ./
tablefield.module - Implements hook_widget_form().
- tablefield_import_csv in ./
tablefield.module - Helper function to import data from a CSV file
File
- ./
tablefield.module, line 510 - 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] = '';
}
}
}