You are here

function sms_carriers_edit_form in SMS Framework 7

Same name and namespace in other branches
  1. 6.2 sms.admin.inc \sms_carriers_edit_form()

Form builder for the carrier edit form.

Parameters

$carrier: An associative array defining the sms carrier.

See also

sms_carriers_edit_form_submit()

1 string reference to 'sms_carriers_edit_form'
sms_menu in ./sms.module
Implements hook_menu().

File

./sms.admin.inc, line 232
The admin sms functions.

Code

function sms_carriers_edit_form($form, $form_state, $carrier = array()) {
  if (!isset($carrier['domain'])) {
    $carrier['domain'] = NULL;
  }
  if (!isset($carrier['name'])) {
    $carrier['name'] = NULL;
  }
  $form['carrier'] = array(
    '#type' => 'value',
    '#value' => $carrier['domain'],
  );
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#default_value' => $carrier['name'],
    '#required' => TRUE,
  );
  $form['domain'] = array(
    '#type' => 'textfield',
    '#title' => t('Domain'),
    '#default_value' => $carrier['domain'],
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}