Laravel 5.5 Invisible Recaptcha 未提交表单
Laravel 5.5 Invisible Recaptcha not submitting form
我在 Laravel 5.5 中有一个项目并试图实现 Google Invisible Captcha 但它一直在控制台上给我这个错误:
Uncaught TypeError: _captchaForm.submit is not a function
我用的是这个enter link description here
错误仅出现在 js 脚本上,我已经尝试从站点中删除所有 js 以显示这一点,但两种方法都不起作用。
我有一个基本表格
<form action="{{ route('post-contact') }}" method="post">
{{ csrf_field() }}
<div class="form-group">
<label>Nombre:</label>
<input type="text" class="form-control" placeholder="Nombre" name="name" />
</div>
<div class="form-group">
<label>Email:</label>
<input type="email" class="form-control" placeholder="Email" name="email" />
</div>
<div class="form-group">
<label>Mensaje:</label>
<textarea class="form-control height-120" placeholder="Mensaje" name="msg"></textarea>
</div>
@captcha('en')
<div class="form-group">
<button class="btn theme-btn" name="submit" type="submit">Enviar consulta</button>
</div>
</form>
我已经在控制台上启用了调试,它说一切都按应有的方式绑定:
Checking element binding of _submitForm...
true
Checking element binding of _captchaForm...
true
Checking element binding of _captchaSubmit...
true
任何帮助将不胜感激,从昨天开始这让我抓狂。
谢谢
我的天我觉得好傻,提交按钮有一个name="submit"属性打破了隐藏验证码的js。
对于将来可能遇到此问题的任何人,请确保您没有使用该名称的元素!
我在 Laravel 5.5 中有一个项目并试图实现 Google Invisible Captcha 但它一直在控制台上给我这个错误:
Uncaught TypeError: _captchaForm.submit is not a function
我用的是这个enter link description here
错误仅出现在 js 脚本上,我已经尝试从站点中删除所有 js 以显示这一点,但两种方法都不起作用。
我有一个基本表格
<form action="{{ route('post-contact') }}" method="post">
{{ csrf_field() }}
<div class="form-group">
<label>Nombre:</label>
<input type="text" class="form-control" placeholder="Nombre" name="name" />
</div>
<div class="form-group">
<label>Email:</label>
<input type="email" class="form-control" placeholder="Email" name="email" />
</div>
<div class="form-group">
<label>Mensaje:</label>
<textarea class="form-control height-120" placeholder="Mensaje" name="msg"></textarea>
</div>
@captcha('en')
<div class="form-group">
<button class="btn theme-btn" name="submit" type="submit">Enviar consulta</button>
</div>
</form>
我已经在控制台上启用了调试,它说一切都按应有的方式绑定:
Checking element binding of _submitForm...
true
Checking element binding of _captchaForm...
true
Checking element binding of _captchaSubmit...
true
任何帮助将不胜感激,从昨天开始这让我抓狂。
谢谢
我的天我觉得好傻,提交按钮有一个name="submit"属性打破了隐藏验证码的js。
对于将来可能遇到此问题的任何人,请确保您没有使用该名称的元素!