I
I
ilia41632020-04-27 13:58:36
MODX
ilia4163, 2020-04-27 13:58:36

2 AjaxForm on same page MODX Revolution?

MODX Version: Revolution

First Form:



<form action="/" method="POST" class="">
            <h4>Записаться на бесплатную неделю занятий</h4>
            <span class="error_name"></span>
            <input type="text" class="input-text" placeholder="Ваше имя:" name="name" value="">
            <span class="error_tel"></span>
            <input type="tel" class="input-text tel" placeholder="Телефон:" name="tel" value="">
            <input type="submit" value="Записаться" class="input-btn">
            <span class="exit">
                <i class="fa fa-times"></i>
            </span>
 </form>


Second form:



<form action="/" class="redfox-form" method="POST">
    <h1>Обращение в Red Fox</h1>
    <span class="error_theme1"></span>
    <input type="text" placeholder="Тема:" value="" name="theme1">
    <span class="error_name1"></span>
    <input type="text" placeholder="Ваше имя:" value="" name="name1">
    <span class="error_tel1"></span>
    <input type="text" placeholder="Ваш телефон:" value="" name="tel1" class="redfox-tel">
    <span class="error_text1"></span>
    <textarea name="" id="" cols="30" rows="10" placeholder="Сообщение:" name="text1"></textarea>
    <input type="submit" value="Отправить" class="red-fox__btn">
</form>


The first form works fine. When filling out the second form and clicking on the submit button, a notification appears that the data has been sent, but the letter does not come to the mail. What could be the problem? help Website red-fox.online
(the first form is in the footer, the link "sign up for a trial lesson", the second form is on the RedFox page).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lunegov, 2020-04-30
@alelunegov

In the form tag , the action parameter is set to the home page of the site, but it is necessary that the processing take place on the current page: The first form works because the AjaxForm snippet (handler) of this form is on all pages, including the home page.
<form action="" ...>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question