You are here

function _sheetnode_content_field_edit_form_submit in Sheetnode 6

Submit function for content_field_edit_form form.

1 string reference to '_sheetnode_content_field_edit_form_submit'
sheetnode_form_alter in ./sheetnode.module
Implementation of hook_form_alter().

File

./sheetnode.module, line 190

Code

function _sheetnode_content_field_edit_form_submit($form, &$form_state) {
  if (!empty($form_state['values']['sheetfield_template'])) {
    $template = _sheetnode_template_load($form_state['values']['sheetfield_template']);
    if (!empty($template)) {
      $form_state['values']['default_value'][0]['value'] = $template->value;
    }
  }
  variable_set('sheetfield_template_' . $form_state['values']['field_name'], $form_state['values']['sheetfield_template']);
}