function sms_sendtophone_form_submit in SMS Framework 7
Same name and namespace in other branches
- 5 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_submit()
- 6.2 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_submit()
- 6 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_submit()
Submit handler for sms_sendtophone_form().
See also
sms_sendtophone_form_validate()
File
- modules/
sms_sendtophone/ sms_sendtophone.module, line 450 - Provides various tools for sending bits of information via SMS.
Code
function sms_sendtophone_form_submit($form, &$form_state) {
if (sms_send($form_state['values']['number'], $form_state['values']['message'], $form_state['values']['gateway'])) {
drupal_set_message(t('The message "@message" sent to @number.', array(
'@message' => $form_state['values']['message'],
'@number' => $form_state['values']['number'],
)));
}
if (isset($_REQUEST['destination'])) {
$form_state['redirect'] = $_REQUEST['destination'];
}
}