Viewing 5 replies - 1 through 5 (of 5 total)
  • clarkh

    (@clarkh)

    Apparent glitch in new version.
    I rolled back to version 3.0 to remove shortcode from email for unused checkboxes.

    philipp.schreiber

    (@philippschreiber)

    Yep, same here!

    pommey

    (@pommey)

    Yep, same here. I’ve got about 100 sites that I can’t update Contact Form 7 on because of this bug. Hope it get’s fixed soon.

    (It would be extra confusing to my clients to have this checkbox shortcode printed into their message, because of the way it’s being used – explaining to all of them to ignore it would be a big logistic hurdle.)

    JulesWebb

    (@juleswebb)

    I’m having the same issue, lucky for me on only one site.

    chromawoods

    (@chromawoods)

    There is a way to fix this without touching the plugin’s core files. Allthough it’s NOT optimal. In your theme’s functions.php, you can catch the $_POST array and check if Contact7 as submitted a form. If a value is missing, just set it to an empty string.

    function check_contact7_values() {
    	$form_elems = array(
    		'my_textfield',
    		'my_other_textfield'
    	);
    
    	foreach ($form_elems as $fe) :
    		if (isset($_POST['_wpcf7']) && !isset($_POST[$fe])) {
    			$_POST[$fe] = '';
    		}
    	endforeach;
    }

    Call it with add_action('init', 'check_contact7_values');

    As stated in the beginning: This is not an optimal solution so let’s hope this gets fixed soon.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Contact Form 7] Checkboxes shows code in mail if unclicked’ is closed to new replies.