function sms_sendtophone_form_alter in SMS Framework 7
Same name and namespace in other branches
- 8 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_alter()
- 5 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_alter()
- 6.2 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_alter()
- 6 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_alter()
- 2.x modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_alter()
- 2.1.x modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_alter()
Implements hook_form_alter().
File
- modules/
sms_sendtophone/ sms_sendtophone.module, line 506 - Provides various tools for sending bits of information via SMS.
Code
function sms_sendtophone_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'sms_sendtophone_inline_form' || $form_id == 'sms_sendtophone_node_form' || $form_id == 'sms_sendtophone_cck_form') {
if (!user_access('send to any number')) {
// Makes number field plain text.
$form['sms']['number']['#type'] = 'item';
$form['sms']['number']['#value'] = $form['sms']['number']['#default_value'];
}
}
}