function tablefield_delete_table_values in TableField 7.2
Same name and namespace in other branches
- 6 tablefield.module \tablefield_delete_table_values()
- 7.3 tablefield.module \tablefield_delete_table_values()
- 7 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 1300 - 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] = '';
}
}
}