function _sheetfield_spreadsheet_process in Sheetnode 6
Process function for sheetfield_spreadsheet element.
1 string reference to '_sheetfield_spreadsheet_process'
- sheetnode_elements in ./
sheetnode.module - Implementation of FAPI hook_elements().
File
- ./
sheetnode.module, line 787
Code
function _sheetfield_spreadsheet_process($element, $edit, $form_state, $form) {
$defaults = $element['#value'];
$field = content_fields($element['#field_name']);
$output = _sheetnode_inject('sheetfield-' . $element['#id'], _sheetnode_sheetfield_aliases($element['#field_name'], $field['widget'], $defaults, $element['#delta']), @$defaults['value'], $element['#id'] . '-' . 'value', isset($form['#node']) ? array(
'entity-type' => 'node',
'oid' => @$form['#node']->nid,
) : NULL, !empty($form['#post']) && empty($form['#post']['op']) && !empty($form['#post'][$element['#field_name'] . '_add_more']));
$element['#tree'] = TRUE;
$element['sheetview'] = array(
'#value' => $output,
'#weight' => -1,
);
$element['value'] = array(
'#type' => 'hidden',
);
$element['name'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => @$defaults['name'],
'#weight' => -2,
);
return $element;
}