function mailchimp_campaign_campaign_form_submit in Mailchimp 7.2
Same name and namespace in other branches
- 7.5 modules/mailchimp_campaign/includes/mailchimp_campaign.admin.inc \mailchimp_campaign_campaign_form_submit()
- 7.3 modules/mailchimp_campaign/includes/mailchimp_campaign.admin.inc \mailchimp_campaign_campaign_form_submit()
- 7.4 modules/mailchimp_campaign/includes/mailchimp_campaign.admin.inc \mailchimp_campaign_campaign_form_submit()
Submit handler for mailchimp_campaign_campaign_form().
_state
Parameters
$form:
File
- modules/
mailchimp_campaign/ mailchimp_campaign.admin.inc, line 184 - Administration pages for mailchimp_campaign module.
Code
function mailchimp_campaign_campaign_form_submit($form, &$form_state) {
$values = $form_state['values'];
$options = array(
'title' => $values['title'],
'subject' => $values['subject'],
'list_id' => $values['list_id'],
'from_email' => $values['from_email'],
'from_name' => check_plain($values['from_name']),
'template_id' => $values['template_id'],
);
$campaign_id = isset($form_state['campaign']) ? $form_state['campaign']->mc_campaign_id : NULL;
mailchimp_campaign_save_campaign($values['content'], $options, $campaign_id);
cache_clear_all('mailchimp_campaign_campaigns', 'cache');
$form_state['redirect'][] = 'admin/config/services/mailchimp/campaigns';
}