Skip validation
Marc Wagner
March 11, 2025
With the filters integrated in the plugin, it is possible to skip the validation for individual forms.
Filter #
It is possible to skip the validation for certain forms. You can use the filter f12-cf7-captcha-skip-validation for this.
add_filter('f12-cf7-captcha-skip-validation', function($skip){ // Wenn bereits ein Überspringen der Validierung angefordert wurde, direkt diesen Wert zurückgeben. if($skip){ return $skip; } // Für alle anderen Formulare soll die Captcha-Validierung nicht übersprungen werden. return false; });
Either true or false is expected as the return value. If the validation is to be skipped, true is returned.
Example Contact Form 7 #
To skip the validation for the Contact Form 7 form with the Post ID 1234, you can use the following code:
add_filter('f12-cf7-captcha-skip-validation', function($skip) { // Wenn bereits ein Überspringen der Validierung angefordert wurde, direkt diesen Wert zurückgeben. if ($skip) { return $skip; } // Prüfen, ob das abgesendete Formular die ID 1234 hat. // Ist das der Fall, wird die Captcha-Validierung für dieses spezielle Formular übersprungen. if (isset($_POST['_wpcf7']) && (int)$_POST['_wpcf7'] === 1234) { return true; } // Für alle anderen Formulare soll die Captcha-Validierung nicht übersprungen werden. return false; });

Article from:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.