Answer the question
In order to leave comments, you need to log in
How in laravel when checking the input to understand which form the errors belong to?
Hello,
I have a method that validates input from several similar forms that are located in several places on the same page.
I have a landing page with several call order forms (top, bottom, popup).
When an input error occurs, I need to display an error message exactly in the form where this error was made. You also need to fill in the fields of this particular form with the past values. And it will be very cool to scroll the page to the desired form.
What is the best way to organize this without using ajax?
Thank you!
Answer the question
In order to leave comments, you need to log in
Add a hidden field to each form form_name
and old('form_name')
check in the template that it is the current one.
Make a hidden field with form id in each form.
In general, something is not properly organized: a strange question, a strange task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question