Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form dosen't submit in laravel #134

Closed
mrmmg opened this issue Aug 30, 2020 · 5 comments
Closed

form dosen't submit in laravel #134

mrmmg opened this issue Aug 30, 2020 · 5 comments

Comments

@mrmmg
Copy link

mrmmg commented Aug 30, 2020

Hi
My Form Does not submit in laravel and in Console this error appears: Uncaught (in promise) null.

If I remove @captcha('en') from blade template the problem solved and form submit successfully.

Do you have any solution?

@zhanang19
Copy link

Can you provide more detail? I think it can be a simple script about that. Cause I can't replicate the issue in my side.

@mrmmg
Copy link
Author

mrmmg commented Aug 30, 2020

@zhanang19 detail like what? can you expain a liitle bit more?

@mrmmg
Copy link
Author

mrmmg commented Aug 30, 2020

@zhanang19

My form (blade template) is:

				<form action="{{route('save-comment')}}" method="post" id="commentform" class="comment-form">
                    <div class="form-group">
                        <label class="form-label" for="author">name</label>
                        <div class="form-item-wrap">
                            <input class="form-item" id="author" name="author" type="text" value="" size="30" maxlength="245" aria-required="true" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="form-label" for="email">email</label>
                        <div class="form-item-wrap">
                            <input class="form-item" id="email" name="email" type="email" dir="ltr" value="" size="30" maxlength="100" aria-describedby="email-notes" aria-required="true" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="form-label" for="comment2">your commenet</label>
                        <div class="form-item-wrap">
                            <textarea class="form-item" id="comment" name="text" cols="45" rows="8" maxlength="65525" aria-required="true" required></textarea>
                        </div>
                    </div>

                    @captcha('en')
                    @csrf
                    <div class="form-submit">
                        <input class="btn btn-primary btn-lg" name="submit" type="submit" value="submit">
                    </div>
                </form>

And that's it. no more information!

@mrmmg
Copy link
Author

mrmmg commented Aug 30, 2020

@zhanang19 sorry for my comments
the debug in console return this error:

image

@JWardee
Copy link

JWardee commented Sep 12, 2020

Just had this exact issue and it turns out it was because my localhost domain wasn't an allowed domain. Make sure you can see the badge by setting INVISIBLE_RECAPTCHA_BADGEHIDE=true in your .env. Once I added my domain it works fine - hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants