M
M
msatmb2015-10-14 10:52:51
MODX
msatmb, 2015-10-14 10:52:51

How to make feedback with two forms per page in modx?

The landing page uses two forms created using FormIt and AjaxForm.
one)

and handler
<form method="post" action="" id="orderform-1">
   <fieldset>
       <input type="text" name="af_name" class="textfield" id="af_name" value="" placeholder="Ваше имя*"/>
       
        <input type="text" name="af_phone" id="af_phone" value="" placeholder="Ваш телефон*"/>
        
   <input type="submit" name="af_submit" class="buttonorder" value="Заказать звонок" />
   </fieldset>
   
  
</form>
<span class="error_name"></span>
<span class="error_name"></span>

2)
and handler
<form method="post" action="/" id="orderform-2">
   <fieldset>
       <input type="text" name="name-2" class="textfield" id="name-2" value="" placeholder="Ваше имя*"/>
       <span class="error_name"></span>
        <input type="text" name="phone-2" class="textfield" id="phone-2" value="" placeholder="Ваш телефон*"/>
        <span class="error_name"></span>
   <input type="submit" name="submit" class="buttonorder" value="Заказать звонок" />
   </fieldset>
   
  
</form>

So, no matter what form I fill out, two letters come to the soap. Tell me where to dig :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-12-13
@Derzaiii

Maybe I'm writing late, but still - You need to add the & submitVar parameter to the call of each form,
i.e.:


<form method="post" action="" id="orderform-1">
   .......
   <input type="submit" name="form1 " class="buttonorder" value="Заказать звонок" />
   .............

And in the same way for the second one - only with any other value of the &submitVar field

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question