You are here

function sms_receive_admin_form_submit in SMS Framework 5

File

modules/sms_receive/sms_receive.module, line 62

Code

function sms_receive_admin_form_submit($form_id, $form_values) {
  if ($form_values['sms_receive_path']) {

    // TODO: validation to check if path was actually set using sms_receive_set_callback
    global $base_url;
    sms_receive_set_callback($base_url . '/' . $form_values['sms_receive_path']);
    variable_set('sms_receive_path', $form_values['sms_receive_path']);
  }
  if ($form_values['sms_receive_content_type']) {
    variable_set('sms_receive_content_type', $form_values['sms_receive_content_type']);
  }
  $sms_fields = sms_receive_sms_fields();
  foreach ($sms_fields as $sms_field) {
    variable_set('sms_receive_field_' . $sms_field, $form_values['sms_receive_field_' . $sms_field]);
  }
}