You are here

function date_field_settings_validate in Date 6

Same name and namespace in other branches
  1. 8 date_admin.inc \date_field_settings_validate()
  2. 5.2 date/date_admin.inc \date_field_settings_validate()
  3. 6.2 date/date_admin.inc \date_field_settings_validate()
  4. 7.3 date.field.inc \date_field_settings_validate()
  5. 7 date_admin.inc \date_field_settings_validate()
  6. 7.2 date.field.inc \date_field_settings_validate()

Custom field settings manipulation.

CCK field settings can't use form_set_value(), so do it in a custom function.

1 string reference to 'date_field_settings_validate'
date_field_settings_form in date/date_admin.inc

File

date/date_admin.inc, line 293
Date administration code. Moved to separate file since there is a lot of code here that is not needed often.

Code

function date_field_settings_validate(&$form, &$form_state) {
  $form_values = $form_state['values'];
  if ($form_values['multiple'] == 99) {
    form_set_value($form['multiple'], 1, $form_state);
    form_set_value($form['repeat'], 1, $form_state);
  }
  else {
    form_set_value($form['repeat'], 0, $form_state);
  }
}