function mailchimp_campaign_list_segment_callback in Mailchimp 7.4
Same name and namespace in other branches
- 7.5 modules/mailchimp_campaign/includes/mailchimp_campaign.admin.inc \mailchimp_campaign_list_segment_callback()
- 7.3 modules/mailchimp_campaign/includes/mailchimp_campaign.admin.inc \mailchimp_campaign_list_segment_callback()
AJAX callback when changing list ID.
1 string reference to 'mailchimp_campaign_list_segment_callback'
- mailchimp_campaign_campaign_form in modules/
mailchimp_campaign/ includes/ mailchimp_campaign.admin.inc - Returns a form for creating a campaign.
File
- modules/
mailchimp_campaign/ includes/ mailchimp_campaign.admin.inc, line 234 - Administration pages for mailchimp_campaign module.
Code
function mailchimp_campaign_list_segment_callback($form, $form_state) {
$commands = array();
$list_segment_html = drupal_render($form['list_segment_id']);
$commands[] = ajax_command_replace('#list-segments-wrapper', $list_segment_html);
if (isset($form['content']['html_wrapper']['merge_vars'])) {
$merge_vars_html = drupal_render($form['content']['html_wrapper']['merge_vars']);
$commands[] = ajax_command_replace('.merge-vars-wrapper', $merge_vars_html);
}
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}