Answer the question
In order to leave comments, you need to log in
How to transfer the checkbox'a selection to another form and then send the data of the two forms in a letter?
The usual sending of customer data from the site to the mail.
Sending itself works, but not as we would like.
I can send the usual form on submit, but I don’t understand how to do this in the case described below.
The gist of the question is this:
<form method="post" action="mailer.php" id="buy-lesson_form">
<div class="buy_radio">
<div class="radio">
<label>
<input type="radio" name="buy_radio" id="buy_hometrain" value="hometrain" checked>
<span></span>Домашние тренировки
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="buy_radio" id="buy_eat" value="eat">
<span></span>Питание
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="buy_radio" id="buy_motivation" value="motivation">
<span></span>Мотивация
</label>
</div>
</div>
<input type="submit" class="buy_button" data-toggle="modal" data-target="#buy_lesson" type="submit" value="submit">
<button type="button" class="buy_button" data-toggle="modal" data-target="#buy_lesson">button</button>
</form>
<form method="post" action="mailer.php" id="superForm-lesson">
<div class="pop-title">УРОК</div>
<input type="text" value="" placeholder="ИМЯ*" title="Введите имя" name="name" class="tooltip textValidation name inputfield">
<input type="text" value="" placeholder="EMAIL*" title="Введите e-mail" name="email" class="tooltip emailPhoneValidation email inputfield">
<input type="text" value="" placeholder="VK или НОМЕР ТЕЛЕФОНА*" title="Введите аккаунт VK или Skype" name="skype" class="tooltip textValidation skype inputfield">
<input type="text" value="УРОК" placeholder="" title="" name="lessontype" class="hidden">
<button type="submit" class="order__btn-lesson buy_button rigth">Заказать</button>
</form>
Answer the question
In order to leave comments, you need to log in
The first form should not have an actiona, because now the first form submit sends to the mail sending script. It should be stopped like this:
form.on("submit", function(event) {
event.preventDefault();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question