Viewing 1 replies (of 1 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Duttlinger,

    Contact Form 7 disabled HTML5 validation by default, so the filter which is used in most other integrations does not work when integrating with Contact Form 7. However, the following code uses CF7 logic to ensure that the “subscribe” checkbox is checked.

    add_filter( 'wpcf7_acceptance', function( $yes ) {
          if( ! $yes ) { return false; }
          return ! empty( $_POST['_mc4wp_subscribe_contact-form-7'] );
    });

    Hope that helps. If not, let me know!

Viewing 1 replies (of 1 total)
  • The topic ‘[mc4wp_checkbox] required field within contact 7’ is closed to new replies.