Render() and add string to the url address of rendered page

if my user input an invalid value in a form, I return the page to him with the error details rendered using:

$app->render(‘form.twig’, [
‘Post’ => $this_post,
‘errors’ => $v->errors(),
‘request’ => $request,
]);

and most of the time, the form is too long that the error details can only be seen if the user will scroll down.

I am just wondering if there’s a way the rendered page’ url can be concatenated with a html anchor something like:

hxxp://site.com/form.html#form-3

Do you guys know any tricks for this?

Thanks!

Look at http://stackoverflow.com/questions/14361517/mark-error-in-form-using-bootstrap
If there are errors you add the error class to the input field and rather than displaying all errors I would only display the first. For that you can use the first filter in Twig. Works nicely with Bootstrap.

that was already implemented but, so i am asking if the method i stated above is possible. but i guess it just can’t be done. but thank you very much.