You are here

function mailchimp_subscribe_anon_form in Mailchimp 7

Same name and namespace in other branches
  1. 6.2 mailchimp.module \mailchimp_subscribe_anon_form()

Return a form for a given MC list

Parameters

<type> $form_state:

<type> $list MC list object:

<type> $q MC object:

Return value

<type> form array

1 string reference to 'mailchimp_subscribe_anon_form'
mailchimp_block_view in ./mailchimp.module
Implements hook_block_view(). Provides a block for each available list for a given user

File

./mailchimp.module, line 559
Mailchimp module.

Code

function mailchimp_subscribe_anon_form($form, $form_state, $list, $q) {
  $form += array(
    '#tree' => TRUE,
    '#id' => 'mailchimp_subscribe_anon_form_' . $list->id,
  );
  $form['description'] = array(
    '#value' => $list->description,
  );
  _mailchimp_subscribe_anon_form($list, $q, $form['mailchimp_lists'][$list->id]);
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Sign Up!'),
    '#weight' => 100,
  );
  return $form;
}