function engagements_mass_sms_form_submit

6.x engagements.module engagements_mass_sms_form_submit($form, $form_state)

Our submit function. Our main task is simply to set off a batch routine.

File

modules/engagements/engagements.module, line 628
This is the primary module file for the engagements module.

Code

function engagements_mass_sms_form_submit($form, $form_state) 
 {


  $values = $form_state ['values'];
  $recipients = trim($values ['recipients']);
  $message = trim($values ['message']);
  $from_number = trim($values ['from_number']);

  // Start a batch operation.


  // Okay, set up the batch....
  $batch = array(
    "operation" => array("engagements_mass_sms_perform_batch_operation", array($recipients, $message, $from_number)),
    "title" => t("Sending Mass Text Messages"),
    "progress_message" => "Attempting to send to recipient @current of @total",
    "display_percent" => TRUE,
  );

  // Set the batch...
  batch_set($batch);
}