You are here

function nd_code_field_form_submit in Node displays 6

Save code field.

1 string reference to 'nd_code_field_form_submit'
nd_code_field_form in includes/nd.fields.inc
Code field form.

File

includes/nd.fields.inc, line 195
Manage fields.

Code

function nd_code_field_form_submit($form, &$form_state) {
  $fields = variable_get('nd_fields', array());
  $fields[$form_state['values']['code_key']] = array(
    'title' => $form_state['values']['code_title'],
    'code' => $form_state['values']['code_code'],
    'exclude' => $form_state['values']['code_exclude'],
    'type' => $form['#field_type'],
  );
  variable_set('nd_fields', $fields);
  $form_state['redirect'] = 'admin/content/types/nd/fields';
  drupal_set_message(t('Field %field has been saved.', array(
    '%field' => $form_state['values']['title'],
  )));
}