Honeypot condition in Forms - or is the hidden field for that?

It would be good to have a honey pot in the forms


I’m playing, and I’m not an expert. What is written below is a working solution, but wrong. There should be actions and filters. But I do not know how or impossible at the moment.


before line // Google ReCAPTCHA v3 (invisible)
add code

      if (! empty ($_POST['email']) ) {
            'code'    => 400,
            'action'  => '',
            'type'    => 'danger',
            'message' => 'spam',

before line // Submit button icon
add code

            <?php echo '<input type="text" name="email" id="form-field-email" style="display:none !important;">'; ?> 

Indeed, it is necessary to have a HoneyPot field for the forms. Elementor has one and we are not going to be left behind with Bricks. Programmers, you can!

Does this help?

1 Like