You are here

function constant_contact_edit_list_form in Constant Contact 7.3

Same name and namespace in other branches
  1. 6.3 admin.lists.inc \constant_contact_edit_list_form()
  2. 6.2 contactlists.admin.inc \constant_contact_edit_list_form()

Form builder callback for contact lists form.

1 string reference to 'constant_contact_edit_list_form'
constant_contact_edit_list in ./admin.lists.inc
Displays the manage contact lists page.

File

./admin.lists.inc, line 50
Manage contact lists.

Code

function constant_contact_edit_list_form($form, $formstate) {
  $cc = constant_contact_create_object();
  if (!is_object($cc)) {
    return '';
  }
  $id = arg(6);
  $cclist = $cc
    ->get_list($id);
  $form = array();

  // List name.
  $form['list'] = array(
    '#type' => 'textfield',
    '#title' => t('List Name'),
    '#description' => t('Enter a name for the contact list'),
    '#default_value' => htmlentities($cclist['Name']),
    '#size' => 60,
  );

  // Sort Order.
  $form['sort_order'] = array(
    '#type' => 'textfield',
    '#title' => t('Sort Order'),
    '#description' => t('Enter the position this list will appear at'),
    '#default_value' => $cclist['SortOrder'],
    '#size' => 5,
  );
  $form['#redirect'] = 'admin/config/services/constant_contact/lists';
  $form['id'] = array(
    '#type' => 'value',
    '#value' => $id,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}