function sms_twilio_admin_form in Twilio SMS Integration 7
Same name and namespace in other branches
- 6 sms_twilio.module \sms_twilio_admin_form()
- 7.2 sms_twilio.module \sms_twilio_admin_form()
Admin/settings form.
1 string reference to 'sms_twilio_admin_form'
- sms_twilio_gateway_info in ./
sms_twilio.module - Implements hook_gateway_info().
File
- ./
sms_twilio.module, line 28 - Adds support for sending SMS messages using the Twilio gateway.
Code
function sms_twilio_admin_form($configuration) {
$form['sms_twilio_api_sid'] = array(
'#type' => 'textfield',
'#title' => t('Account SID'),
'#description' => t('Twilio Account SID - the 34 character string beginning with AC'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => !empty($configuration['sms_twilio_api_sid']) ? $configuration['sms_twilio_api_sid'] : '',
);
$form['sms_twilio_api_auth_token'] = array(
'#type' => 'textfield',
'#title' => t('API ID'),
'#description' => t('Twilio auth token - <a href="https://www.twilio.com/user/account">available on your dashboard</a>'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => !empty($configuration['sms_twilio_api_auth_token']) ? $configuration['sms_twilio_api_auth_token'] : '',
);
$form['sms_twilio_number'] = array(
'#type' => 'textfield',
'#title' => t('Number'),
'#description' => t('A <a href="https://www.twilio.com/user/account/phone-numbers" target="_new">phone number</a> from your Twilio account'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => !empty($configuration['sms_twilio_number']) ? $configuration['sms_twilio_number'] : '',
);
$form['sms_twilio_path'] = array(
'#type' => 'textfield',
'#title' => t('Twilio library path'),
'#description' => t('The path to the twilio library'),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => !empty($configuration['sms_twilio_path']) ? $configuration['sms_twilio_path'] : 'sites/all/libraries/twilio',
);
$form['sms_twilio_api'] = array(
'#type' => 'radios',
'#title' => t('Twilio API Version'),
'#description' => t('The version of the above path to use for the Twilio API'),
'#options' => array(
'2008-08-01' => '2008-08-01',
'2010-04-01' => '2010-04-01',
),
'#default_value' => !empty($configuration['sms_twilio_api']) ? $configuration['sms_twilio_api'] : DEFAULT_TWILIO_API_VERSION,
);
return $form;
}