You are here

function constant_contact_block in Constant Contact 6.2

Same name and namespace in other branches
  1. 5 constant_contact.module \constant_contact_block()
  2. 6.3 constant_contact.module \constant_contact_block()
  3. 6 constant_contact.module \constant_contact_block()

Enables us to add a custom signup form using a block

File

./constant_contact.module, line 562

Code

function constant_contact_block($op = 'view', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks[0] = array(
        'info' => t('Constant Contact Signup Form'),
      );
      return $blocks;
    case 'configure':
      $form = array();
      return;
    case 'save':
      return;
    case 'view':
      switch ($delta) {
        case 0:
          $block['subject'] = t('Signup');
          $block['content'] = drupal_get_form('constant_contact_signup_form');
          break;
      }
      return $block;
  }
}