Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter DorinIordache

    (@doriniordache)

    Versions instaled
    WordPress: 4.3.1
    Contact form 7: 4.2.1
    Flamingo: 1.3

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Make demo_mode off.

    Thread Starter DorinIordache

    (@doriniordache)

    well… that is the problem… i want to save in flamingo but i don`t want to send the mail.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Add this code to functions.php in your current theme:

    add_filter( 'wpcf7_skip_mail', '__return_true' );

    And remove demo_mode: on from Additional Settings.

    Thread Starter DorinIordache

    (@doriniordache)

    hmmm … getting close.
    if i add this. this will happen to all my contact forms. and i have a lot.
    i need this to happen only for 5 of my contact forms.
    im sorry. im quite new at this.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    add_filter( 'wpcf7_skip_mail', 'your_wpcf7_skip_mail' );
    
    function your_wpcf7_skip_mail( $skip_mail, $contact_form ) {
    	if ( in_array( $contact_form->id, array( 12345, 23456, 34567, 45678, 56789 ) ) {
    		return true;
    	}
    
    	return $skip_mail;
    }

    Replace the numbers in the code with the actual contact form ID.

    Thread Starter DorinIordache

    (@doriniordache)

    add_filter( ‘wpcf7_skip_mail’, ‘your_wpcf7_skip_mail’, 10, 2 );

    and is working …. 10x

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Contact-form 7 demo_mode: on’ is closed to new replies.