N
N
Nikolai2019-02-04 14:18:12
MODX
Nikolai, 2019-02-04 14:18:12

How to get rid of formit + AjaxForm modx spam?


<div class="main-form">
  <div class="main-form__container container">
    <div class="main-form__row row">
      <div class="main-form__col col-12 col-lg-9">
        <h2 class="main-form__title">Оставьте свои данные,<br>мы расчитаем стоимость и перезвоним вам.
        </h2>
      </div>
    </div>
    <form name="2-main" action="" class="main-form__form ajax_form af_example">
      <div class="main-form__row-form row"> 
        <div class="main-form__col col-12 col-lg-4 col-xl-3">
          <label class="main-form__label"> <span> Контактное лицо</span>
            <input class="main-form__input" name="name" type="text" placeholder="Введите имя"/>
          </label>
        </div>
        <div class="main-form__col col-12 col-lg-4 col-xl-3">
          <label class="main-form__label"> <span> Контактный телефон</span>
            <input class="main-form__input" name="phone" type="tel" placeholder="Введите телефон"/>
          </label>
        </div>
        <div class="main-form__col col-12 col-lg-4 col-xl-3">
          <label class="main-form__label"> <span> E-mail</span>
            <input class="main-form__input" name="email" type="email" placeholder="Введите email"/>
          </label>
        </div>
      </div>
      <div class="main-form__row-form row"> 
        <div class="main-form__col col-12 col-lg-4 col-xl-3">
          <label class="main-form__label"> <span> Наименование компании</span>
            <input class="main-form__input" name="organization" type="text" placeholder="Введите наименование"/>
          </label>
        </div>
        <div class="main-form__col col-12 col-lg-8 col-xl-6">
          <label class="main-form__label"> <span> Ваше сообщение</span>
            <textarea class="main-form__input" name="message" type="text" placeholder="Введите текст"></textarea>
          </label>
        </div>
      </div>
      
      <div class="main-form__row-form row align-items-center">
        <div class="main-form__col col-12 col-lg-5">
          <div class="main-form__agree-konf">
             Нажимая кнопку “Отправить заявку”, вы соглашаетесь с настоящей <a href="/legal.html">политикой конфиденциальности</a>
          </div>
        </div>
        <div class="main-form__col col-12 col-lg-7 col-xl-4 d-flex align-items-end justify-content-end">
          <button class="main-form__btn-show btn btn btn--transparent" type="button">Расширенная форма
          </button>
          <button class="main-form__btn-submit btn" type="submit">Отправить
          </button>
        </div>
      </div>
      
      
    </form>
  </div>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Tarasov, 2019-02-04
@an-tar

Usually Formit has one or a combination of several options:
1. Google Recaptcha V2
2. Math hook
3. Spam hook (checking if the hidden field is empty)
4. Checking against spam databases
Several useful links:
One
Two
Three
Four
It is also indirectly useful to send mail via smtp, have MX records on your domain, correctly configure SPF and DKIM server headers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question