There is a form:
<form class="js-ajax-form"> <!-- Ivan Triumphov code Get8(amoCRM) убрал action="/forms/sendmail.php" method="post" --> <input type="hidden" name="reachgoal" value="mainRightForm" class="js-reach-goal"> <input type="hidden" name="type_form" value="zayvka"> <input class="field" placeholder="Имя" name="fio"> <input class="field" placeholder="Телефон" name="phone" id="phone1"> </form> How to check if the form has a field? by name attribute
so $('.js-ajax-form').is('input[name="phone"]'); always false
isyou need to usehas- Grundy