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

  • Ok I had to return post_id for it to be saved.
    Still, I don’t get why with this code, when the honeypot ‘surname3’ is not empty, the form still get saved, altough completely empty.

    Isn’t die supposed to terminate the whole process?

    function my_honey_pot( $post_id ) {
    	if(! empty($_POST['surname3'])){
    		die("");
        } else {
    		return $post_id;				
    	}
    }
    add_action('acf/pre_save_post' , 'my_honey_pot'  );