Advertisement
bongzilla

Untitled

Jun 2nd, 2022 (edited)
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <script>
  2. $(document).ready(function() {
  3. const forms = document.querySelectorAll("form");
  4.  
  5. [...forms].forEach(form => {
  6. let hpField = document.createElement("input");
  7. hpField.type = "text";
  8. hpField.id = "hp-field";
  9. hpField.name = "hpfield";
  10.  
  11. form.appendChild(hpField);
  12. });
  13.  
  14. });
  15. </script>
  16.  
  17. /* add to mailer.php on ~357 line after
  18. * var formData = new FormData($(cur_id)[0]);
  19. */
  20.  
  21. // let honeypotFilled = formData.get("hpfield").length > 0;
  22. // if(honeypotFilled) return;
  23.  
  24. /* hide field */
  25. input[type="text"]#hp-field {
  26. display: none;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement