You are here

function _sheetnode_spreadsheet_process in Sheetnode 7.2

Same name and namespace in other branches
  1. 7 sheetnode.module \_sheetnode_spreadsheet_process()

Process function for spreadsheet element.

1 string reference to '_sheetnode_spreadsheet_process'
sheetnode_element_info in ./sheetnode.module
Implements hook_element_info().

File

./sheetnode.module, line 933
Module file for the sheetnode module.

Code

function _sheetnode_spreadsheet_process($element, &$form_state, $form) {
  $value = $element['#value'];
  $output = _sheetnode_inject(drupal_clean_css_identifier('sheetfield-' . $element['#id']), array(
    $element['#name'],
    $element['#title'],
  ), $value, drupal_clean_css_identifier($element['#id']), NULL);
  $element['#tree'] = TRUE;
  $element['value'] = array(
    '#type' => 'hidden',
    '#attributes' => array(
      'id' => drupal_clean_css_identifier($element['#id']),
    ),
    '#prefix' => $output,
  );
  return $element;
}