You are here

function constant_contact_edit_list_form in Constant Contact 6.2

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

Displays the manage contact lists page in the admin

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

File

./contactlists.admin.inc, line 73

Code

function constant_contact_edit_list_form($form, $formstate) {
  $id = isset($formstate['id']) ? $formstate['id'] : 0;

  // if we have an object do the stuff...
  $cc = constant_contact_create_object();
  if (is_object($cc)) {
    $cclist = $cc
      ->get_list($id);
    $form = array();

    // add account settings
    $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,
    );
    $form['#redirect'] = 'admin/constant_contact/lists';
    $form['id'] = array(
      '#type' => 'value',
      '#value' => $id,
    );
    $form['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Save'),
    );
    return $form;
  }
}