Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Multiple form submission on one page FormIl MODx?
Good afternoon, I'm trying to get the forms working on one page, for the uniqueness of the forms I use submitVar.
This chunk is called directly in the template:
[[!AjaxForm?
&snippet=`FormIt`
&form=`tpl-popup`
&hooks=`email,order_to_amo`
&emailSubject=`Free Lesson Request!`
&emailTpl=`EmailTpl-popup`
&emailTo=`[[$email_to]]`
&emailFrom=`[[ $email_from]]`
&submitVar=`submit-
1` &ClientName=`name`
&ClientPhone=`phone`
&ClientEmail=``
&validate=`phone:required`
&validationErrorMessage=`The form contains errors!`
&successMessage=`Thank you for submitting your submission.
]]
The form itself:
<div class="popup">
<img src="/assets/images/close.png">
<form method="POST" action="">
<div class='block'>
<input type="hidden" name="typeform" value="Всплывающее окно">
<input required type="text" class="name" name="name" placeholder="Ваше имя">
<input required class='phone' type="text" name="phone" class="phone" placeholder="Ваш телефон">
<input type="hidden" name="submit-popup" value="1">
</div>
[[+utms_fields]]
<div class='block'>
<button type='submit' name="submit-1">Записаться</button>
</div>
</form>
</div>
<h1>Заявка с сайта [[!SERVER? &key=`HTTP_HOST`]]</h1>
Пользователь оставил заявку на обратны звонок
<br/>
<br/>
<b>Имя:</b> [[+name]]
<b>Телефон:</b> [[+phone]]
<br />
<br />
Страница на которой находится посетитель: <a href="[[+link]]">[[+link]]</a><br />
Адрес веб сайта с которого пришел посетитель:<a href="[[+referer]]">[[+referer]]</a><br />
IP - адрес: [[!SERVER? &key=`REMOTE_ADDR`]]<br />
Дата: [[!date? &format=`d.m.Y H:i`]]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question