FormIt+AjaxForm sending multiple emails (3) instead of one

Snippet call:

    [[!AjaxForm?
    	&snippet=`FormIt`
    	&form=`tpl.AjaxForm.consult.crm6034`
    	&submitVar=`consult__submit_6034`
    	&hooks=`spam,FormItSaveForm,email`
    	&emailTpl=`mail.consult`
    	&emailSubject=`Заявка на бесп. консультацию`
    	&emailTo=`[[++our_email]]`
    	&validate=`fullname:blank`
    	&successMessage=`Заявка успешно отправлена`
    	&validationErrorMessage=`Некорректно заполнены данные`
    ]]

Form HTML (chunk tpl.AjaxForm.consult.crm6034):

    <form action="" class="form_phone ajax_form af_consult_crm6034" id="****_crm6034" method="post" onSubmit="ym('56***011','reachGoal', 'FORM_SUBMIT');">
    	[[+fi.validation_error:notempty=`[[+fi.validation_error_message]]`]]
    	[[+fi.success:notempty=`[[+fi.successMessage]]`]]
    	<input type="hidden" name="consult__submit_6034" value="1">
    	<input type="text" style="display: none;" name="fullname">
    	<input type="hidden" name="nospam:blank" value="[[+fi.nospam]]">

    	<input type="text" name="phone" class="form_phone-input" placeholder="Your phone" value="[[+fi.phone]]" data-validation-callbacks="not_empty">
    	<button class="modal__submit" type="submit" name="submit">Send</button>
    	<div>[[+fi.error.phone]]</div>
    </form>

Can you share some more info: do you have any errors in the Javascript error console, do you have any errors in your error log? Do you have any other JS on the page that binds to a form submit event? Can you edit the Ajaxform JS to console.log the events as they take place to find out why its calling the snippet 3 times?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.