<form action="" method="post" class="ajax_form af_example">
<div class="form-group">
<input type="text" class="form-control" placeholder="Имя" name="name" id="af_name">
</div>
<div class="form-group">
<input type="tel" class="form-control" placeholder="Телефон" name="phone" id="af_phone">
</div>
<div class="form-group">
<button type="submit" class="btn form__btn">[[%af_submit]]</button><br>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1" required>
<label class="form-check-label" for="exampleCheck1">Даю согласие на обработку персональных данных</label>
</div>
[[+fi.success:is=`1`:then=`
<div class="alert alert-success">[[+fi.successMessage]]</div>
`]]
[[+fi.validation_error:is=`1`:then=`
<div class="alert alert-danger">[[+fi.validation_error_message]]</div>
`]]
</form>
<form action="[[!obr?]]" method="post" class="ajax_form af_example">
<div class="form-group">
<input type="text" class="form-control" placeholder="Имя" name="name" id="af_name">
</div>
<div class="form-group">
<input type="tel" class="form-control" placeholder="Телефон" name="phone" id="af_phone">
</div>
<div class="form-group">
<button type="submit" class="btn form__btn">[[%af_submit]]</button><br>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1" required>
<label class="form-check-label" for="exampleCheck1">Даю согласие на обработку персональных данных</label>
</div>
</form>
[[+fi.success:is=`1`:then=`
<div class="alert alert-success">[[+fi.successMessage]]</div>
`]]
[[+fi.validation_error:is=`1`:then=`
<div class="alert alert-danger">[[+fi.validation_error_message]]</div>
`]]
[[!AjaxForm?
&form=`form-main`
&snippet=`FormIt`
&hooks=`FormItSaveForm,email`
&emailSubject=`Сообщение с сайта galkam.ru`
&emailTo=`yagofarov.vadim@mail.ru`
&emailFrom=`no-reply@mysite.com`
&emailTpl=`tpl.email`
&validate=`name:minLength=^2^,email:email:required,message:minLength=^10^`
&validationErrorMessage=`В форме содержатся ошибки!`
&successMessage=`Сообщение успешно отправлено`
]]
&validate=`name:minLength=^2^,email:email:required,message:minLength=^10^`
читаем так: «Должно быть обязательно заполнено поле name="name" и минимум двумя символами, поле name="email" должно быть обязательно заполнено и по правилам адресов электронной почты, поле name="message" должно содержать минимум 10 символов.»action="[[!obr?]]"
надеюсь у вас осмысленная. <form action="" method="post" class="ajax_form af_example">
<div class="form-group">
<label class="control-label" for="af_name">[[%af_label_name]]</label>
<div class="controls">
<input type="text" id="af_name" name="name" value="[[+fi.name]]" placeholder="" class="form-control"/>
<span class="error_name">[[+fi.error.name]]</span>
</div>
</div>
<div class="form-group">
<label class="control-label" for="af_email">[[%af_label_email]]</label>
<div class="controls">
<input type="email" id="af_email" name="email" value="[[+fi.email]]" placeholder="" class="form-control"/>
<span class="error_email">[[+fi.error.email]]</span>
</div>
</div>
<div class="form-group">
<label class="control-label" for="af_message">[[%af_label_message]]</label>
<div class="controls">
<textarea id="af_message" name="message" class="form-control" rows="5">[[+fi.message]]</textarea>
<span class="error_message">[[+fi.error.message]]</span>
</div>
</div>
<div class="form-group">
<div class="controls">
<button type="reset" class="btn btn-default">[[%af_reset]]</button>
<button type="submit" class="btn btn-primary">[[%af_submit]]</button>
</div>
</div>
[[+fi.success:is=`1`:then=`
<div class="alert alert-success">[[+fi.successMessage]]</div>
`]]
[[+fi.validation_error:is=`1`:then=`
<div class="alert alert-danger">[[+fi.validation_error_message]]</div>
`]]
</form>