<form id="form" action="mail.php" method="post">
<!-- progressbar -->
<ul id="progressbar">
<li class="active"></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<!-- fieldsets -->
<fieldset>
<h4 class="fs-title">Для чего нужна система в первую очередь?</h4>
<p class="fs-subtitle">выберете один или несколько вариантов</p>
<div class="form-group">
<input type="checkbox" id="visits" name="visits"/>
<label for="visits">Учет посещений</label>
</div>
<div class="form-group">
<input type="checkbox" id="sales" name="sales"/>
<label for="sales">Продажи</label>
</div>
<div class="form-group">
<input type="checkbox" id="warehouse" name="warehouse"/>
<label for="warehouse">Учет склада</label>
</div>
<div class="form-group">
<input type="checkbox" id="marketing" name="marketing"/>
<label for="marketing">Маркетинг</label>
</div>
<div class="form-group">
<input type="checkbox" id="staff" name="staff"/>
<label for="staff">Управление персоналом</label>
</div>
<div class="form-group">
<input type="checkbox" id="finance" name="finance"/>
<label for="finance">Учет финансов</label>
</div>
<div class="form-group">
<input type="checkbox" id="other1" name="other1"/>
<label for="other1">Другое</label>
</div>
<input type="button" name="next" class="next action-button" value="Next" />
</fieldset>
<fieldset>
<h4 class="fs-title">Какой у вас бизнес?</h4>
<div class="form-group">
<input type="checkbox" id="fitness_club" name="fitness_club"/>
<label for="fitness_club">Фитнес-клуб</label>
</div>
<div class="form-group">
<input type="checkbox" id="fitness_studio" name="fitness_studio"/>
<label for="fitness_studio">Фитнес-студия</label>
</div>
<div class="form-group">
<input type="checkbox" id="dancing" name="dancing"/>
<label for="dancing">Школа танцев</label>
</div>
<div class="form-group">
<input type="checkbox" id="sports_complex" name="sports_complex"/>
<label for="sports_complex">Спорткомплекс</label>
</div>
<div class="form-group">
<input type="checkbox" id="pool" name="pool"/>
<label for="pool">Басейн</label>
</div>
<div class="form-group">
<input type="checkbox" id="crossfit" name="crossfit"/>
<label for="crossfit">Кроссфит-центер</label>
</div>
<div class="form-group">
<input type="checkbox" id="other2" name="other2"/>
<label for="other2">Другое</label>
</div>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</fieldset>
<fieldset>
<h4 class="fs-title">Нужен ли модуль CRM?</h4>
<div class="form-group">
<input type="checkbox" id="yes" name="yes"/>
<label for="yes">Да</label>
</div>
<div class="form-group">
<input type="checkbox" id="not" name="not"/>
<label for="not">Нет</label>
</div>
<div class="form-group">
<input type="checkbox" id="consultation" name="consultation"/>
<label for="consultation">Нужна консультация</label>
</div>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</fieldset>
<fieldset>
<h4 class="fs-title">Сколько одновременно доступов необходимо?</h4>
<div class="form-group">
<input type="checkbox" id="one" name="one"/>
<label for="one">1</label>
</div>
<div class="form-group">
<input type="checkbox" id="two" name="two"/>
<label for="two">2</label>
</div>
<div class="form-group">
<input type="checkbox" id="more" name="more"/>
<label for="more">3 и более</label>
</div>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</fieldset>
<fieldset>
<h4 class="fs-title">Create your account</h4>
<input type="text" name="name" placeholder="Ваше имя*" required="required" pattern="[a-zA-Zа-яА-Я]+">
<input type="tel" name="phone" placeholder="Ваш телефон*" required="required" minlength="10" maxlength="15">
<input type="button" name="previous" class="previous action-button" value="Previous" />
<!-- <input type="submit" name="submit" class="submit action-button" value="Submit" /> -->
<button type="submit" class="button arrow">ЗАКАЗАТЬ КОНСУЛЬТАЦИЮ</button>
</fieldset>
</form>
$(document).ready(function() {
$("#form").submit(function() {
$.ajax({
type: "POST",
url: "http://ermakit.arcuda-club.com/wp-content/themes/ermakit/mail.php",
data: $(this).serialize()
}).done(function() {
$(this).find("input").val("");
alert("Спасибо за заявку! Скоро мы с вами свяжемся.");
$("#form").trigger("reset");
});
return false;
});
});
<?php
$recepient = "new.sworker90@gmail.com";
$sitename = "Ermakit";
$name = trim($_POST["name"]);
$phone = trim($_POST["phone"]);
$visits = trim($_POST["visits"]);
$sales = trim($_POST["sales"]);
$warehouse = trim($_POST["warehouse"]);
$marketing = trim($_POST["marketing"]);
$staff = trim($_POST["staff"]);
$finance = trim($_POST["staff"]);
$other1 = trim($_POST["other1"]);
$fitness-club = trim($_POST["fitness-club"]);
$fitness-studio = trim($_POST["fitness-studio"]);
$dancing = trim($_POST["dancing"]);
$sports-complex = trim($_POST["sports-complex"]);
$pool = trim($_POST["pool"]);
$crossfit = trim($_POST["crossfit"]);
$other2 = trim($_POST["other2"]);
$yes = trim($_POST["yes"]);
$not = trim($_POST["not"]);
$consultation = trim($_POST["consultation"]);
$one = trim($_POST["one"]);
$two = trim($_POST["two"]);
$more = trim($_POST["more"]);
$message = "Имя: $name
\nТелефон: $phone
\nШаг1: $visits
\nШаг1: $sales
\nШаг1: $warehouse
\nШаг1: $marketing
\nШаг1: $staff
\nШаг1: $finance
\nШаг1: $other1
\nШаг2: $fitness_club
\nШаг2: $fitness_studio
\nШаг2: $dancing
\nШаг2: $sports_complex
\nШаг2: $pool
\nШаг2: $crossfit
\nШаг2: $other2
\nШаг3: $yes
\nШаг3: $not
\nШаг3: $consultation
\nШаг4: $one
\nШаг4: $two
\nШаг4: $more" ;
$pagetitle = "Новая заявка";
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: $recepient");