Ad

Laravel 5.2 - Validation Errors (How Do I Get The Page To Return To The Exact Point In The Scroll)

- 1 answer

I have successfully set up validation errors for my laravel 5.2 app. But my form is at the bottom of the page. When a validation error gets triggered, the page reloads with the error, but it goes to the top of the page. Is there any way to have the page refresh and stay at the point in the scroll that that user had it? Or at the point where the form is (/#calltoaction). Thank you!

Ad

Answer

Hope you can try the <form action={{route('url','#calltoaction')}} method="post">

So this will make you like http://url?#calltoaction

Ad
source: stackoverflow.com
Ad