• Resolved bilums13

    (@bilums13)


    Hey,
    So we run a not for profit in the UK and through our site we’ve got different contact 7 forms for visitors to engage with us in different ways.

    In the past if visitors contacted us through contact form A, they would be on the MailPoet list A, if they contacted us through contact form B, they would be on List B.

    We’re migrating from Mailpoet to Mailchimp and as we’re limited to 3 audiences / lists now I’m getting my head around Mailchimps tags and interests.

    I understand that we can work with just one audience, and each contact form 7 subscribes users with a specific Tag. Two questions, am I getting this right and if I am can I achieve it with this plugin

    Chars

Viewing 1 replies (of 1 total)
  • Plugin Contributor Freddie

    (@fmixell)

    You could just use the shortcodes or Gutenberg block that comes with this plugin. They’re very stripped down with css and could possibly match what you have with Contact Form 7.

    That being said there are ways to target different things with our filters. The following example chooses different interest groups based upon the id of the form being used.

    function custom_easy_interest_groups( $data ) {
    	$form_id = 0;
    
    	try {
    		$current_form = WPCF7_ContactForm::get_current();
    		$form_id = $current_form->id();
    	} catch ( Exception $e ) {}
    
    	if ( $form_id == 0 ) {
    		error_log('Exit early form not found.');
            return $data;
        }
    
    	switch( $form_id ) {
    		case 102:
    			$data['interests'] = array( 'cde2739c3c' => true );
    			break;
    		case 106:
    			$data['interests'] = array( 'a6f4ad836f' => true );
    			break;
    		default:
    			error_log("No match: " . $form_id);
    			break;
    	}
    
        return $data;
    }
    add_filter( 'yikes-mailchimp-checkbox-integration-body', 'custom_easy_interest_groups' );

    Let me know if this is something you’d be interested in, also you should give our built in forms a try because then you’ll have more fine grained control that you’re looking for.

    Cheers,
    Freddie

Viewing 1 replies (of 1 total)

The topic ‘Different Interests in Different Forms’ is closed to new replies.