Javascript 在哪里可以找到使用Firefox开发工具的onSubmit表单字段检查?

Javascript 在哪里可以找到使用Firefox开发工具的onSubmit表单字段检查?,javascript,forms,silverstripe,devtools,onsubmit,Javascript,Forms,Silverstripe,Devtools,Onsubmit,我将Google reCaptcha集成到一个网站表单中。之前,在表单提交时,webapp会检查是否已填写所有表单。在我集成了reCaptcha之后,这个表单检查不再运行,即使字段为空,表单列表也会发送 我试图找到进行检查的javascript,但找不到它。我运行了Firefox DevTools运行时分析,并检查了Flame图表以查看javascript调用堆栈。在那里我发现了一些jquery函数,但这并不是全部,因为表单字段检查不是由jquery完成的 通过什么menas我可以找到,调用什么

我将Google reCaptcha集成到一个网站表单中。之前,在表单提交时,webapp会检查是否已填写所有表单。在我集成了reCaptcha之后,这个表单检查不再运行,即使字段为空,表单列表也会发送

我试图找到进行检查的javascript,但找不到它。我运行了Firefox DevTools运行时分析,并检查了Flame图表以查看javascript调用堆栈。在那里我发现了一些jquery函数,但这并不是全部,因为表单字段检查不是由jquery完成的

通过什么menas我可以找到,调用什么javascript函数来进行检查?或者可以在其他地方进行检查,例如在CSS中

也很奇怪:在整个项目代码中找不到发布的错误消息“请填写此字段”。我签入了我的IDE

该网页使用twitter引导,jQuery 1.12.4,并在Silverstripe CMS 3.6和userforms模块上运行(尽管此特定表单出现在相应的页面模板中)


我很感激任何暗示。我花了好几个小时研究这个问题

我有两个问题:

-首先:我有一个id为“submit”的submit按钮,如GoogleRecaptcha文档示例()中所示。但是,如果与jQuery()一起使用,这可能会导致“混乱的失败”。因此,我重命名了按钮id=“submit\u button”,表单已提交。

-第二:表单验证是由HTML5完成的,我不知道HTML5的存在。这是通过输入表单字段的“必需”属性激活的。我真丢脸

我的表单现在可以正常工作,如下所示:

<h2>Anfrage</h2>
<form action="formaction.php" method="post" id="form-offer"  class="form-std form-offer" enctype="multipart/form-data" >
    <fieldset>
        <label>Firma * <input name="firma" required="" type="text"></label>
        <select name="anrede" required="">
            <option value="">Anrede *</option>
            <option value="Herr">Herr</option>
            <option value="Frau">Frau</option>
        </select>
        <label>Name und Vorname Kontaktperson *<input name="vorname" required="" type="text"></label>
        <label>PLZ &amp; Ort *<input name="ort" required="" type="text"></label>
        <label>Adresse *<input name="adresse" required="" type="text"></label>
        <select name="land" required="">
            <option value="">Land *</option>
            <option value="Afghanistan">Afghanistan</option>
            <option value="Ägypten">Ägypten</option>
            <option value="Aland">Aland</option>
            <option value="Albanien">Albanien</option>
        </select>
        <label>E-Mail *<input name="email" required="" type="email"></label>
        <label>Telefon *<input name="telephone" required="" type="text"></label>
    </fieldset>
    <div class="g-recaptcha"
         data-sitekey="sdfsdfsdfsdfsdf"
         data-size="invisible"
         data-callback="formSubmit">
    </div>

    <button id="submit_button">Send<i class="icon icon-chevron-right"></i></button>

    <input name="block" value="167" type="hidden">
    <input name="locale" value="de_DE" type="hidden">
</form>

<link rel="stylesheet" type="text/css" href="body.min.css">


<script src="jquery-12.js"></script>
<script defer="" src="main.js"></script>

<script src="https://www.google.com/recaptcha/api.js"></script>

<script>
    (function($, document, undefined){

        $('#form-offer').submit(function (event) {
            event.preventDefault();
            grecaptcha.reset();
            grecaptcha.execute();
        });

    })(jQuery, document, undefined);

    function formSubmit(response) {
        // submit the form which now includes a g-recaptcha-response input
        var myForm = document.getElementById("form-offer");
        myForm.submit();
    }
</script>
Anfrage
菲尔马*
安雷德*
先生
夫人
名字和名字*
PLZ&;奥特*
阿迪斯*
土地*
阿富汗
Ägypten
阿兰
阿尔巴宁
电子邮件*
电传*
发送
(函数($,文档,未定义){
$(“#表单报价”)。提交(功能(事件){
event.preventDefault();
grecaptcha.reset();
grecaptcha.execute();
});
})(jQuery,文档,未定义);
功能表单提交(响应){
//提交现在包含g-recaptcha-response输入的表格
var myForm=document.getElementById(“表单报价”);
myForm.submit();
}
-请在您的问题中添加一个