Open elijahpaul opened 5 years ago
Any idea how I'd go about using this package in a form that is loaded/refreshed via AJAX?
I'm currently refreshing an existing form in place via jQuery .load()?
.load()
register.blade.php
...... <div id="content"> <form method="POST" action="{{ secure_url('register') }}"> @csrf <input id="name" type="text" name="name" required autofocus> <input id="email" type="email" name="email" required> <input id="password" type="password" name="password" required> <button id="submit-btn" type="submit" class="btn"> @captcha() </form> </div> ......
AJAX that reloads the above form
...... $.ajax({ data: {locale: lang_prefix}, type: 'GET', url: '/locale/' + lang_prefix, success: function (result) { $('#content ').load(location.href + ' #content>*', ''); } }); ......
but the scripts in the rendered @captcha directive don't reload/execute.
@captcha
Any idea how I'd go about using this package in a form that is loaded/refreshed via AJAX?
I'm currently refreshing an existing form in place via jQuery
.load()
?register.blade.php
AJAX that reloads the above form
but the scripts in the rendered
@captcha
directive don't reload/execute.