Support

Account

Home Forums Front-end Issues Comment spam via front end form textarea field Reply To: Comment spam via front end form textarea field

  • Hi @tsmulugeta in acf_form add this arguments line:

    'html_after_fields' => '<input type="text" id="honeypot" name="honeypot" autocomplete="off">',

    in file functions.php, this code:

    // CHECK PRE SAVE POST ACF
    function honeypot( $post_id ) {
    	if($_POST['honeypot'] != ''){
    		die("You spammer!");
    	}
    }
    add_filter('acf/pre_save_post' , 'honeypot', 10, 1 );

    in your css style:

    #honeypot {display:none;}