Support the ongoing development of Laravel.io →
Configuration Authentication Forms

I have a simple login form that is a modal popup. I can make the form work outside of modal fine, but inside it doesn't submit. I've seen lots of posts about ajax, etc, but is there a way to just use the simpler HTML form world to submit the login? Here is the simple form...

{!! Form::open(array('url' => 'auth/login', 'method' => 'post')) !!}
{!! Form::text('email', 'Email address') !!}
{!! Form::text('password', 'Password') !!}
{!! Form::submit('Log me in') !!}
Last updated 3 years ago.
0

You can first try to make it submit with simple html (without Form facade). By the way you don't have {!! Form::close() !!} in your example. See if you have it in modal.

0

Thanks - got it working now, but I see I have the same problem others have posted about: When you submit the form it takes you back to the main page rather than display a correct or incorrect login message on the login form. From what I've seen to keep the form open after submit I either have to use Ajax to submit the form, or an iframe. Any advice on how to keep it open?

0

If you want to submit the form without page reloading ajax will be a good way to do that.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

pentelicus pentelicus Joined 31 May 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.