You are here

function webform_grid_remove_options in Webform 7.4

Helper. Replace missing options with empty values.

Parameters

array $header: An array of options to be used at the grid table header.

array $row_options: An array of options to be used for this row.

Return value

array The $row_options with any missing options replaced with empty values.

1 call to webform_grid_remove_options()
webform_expand_grid in components/grid.inc
A Form API #process function for Webform grid fields.

File

components/grid.inc, line 372
Webform module grid component.

Code

function webform_grid_remove_options(array $header, array $row_options) {
  foreach ($header as $key => $value) {
    if (!isset($row_options[$key])) {
      $header[$key] = '';
    }
  }
  return $header;
}