I have a formit form in the footer of a site, and currently when there is a validation error the page is just reloaded and the user is sent back to the top of the page. The error messages are displaying as they should but the problem is I want to send the user to the top of the form in the footer on an error instead. Is there anyway to specify which section (i.e. a div) the user is directed to on the error validation? How would I do this?
You can do it with anchors:
<form action="[[~[[*id]]]]#message" method="post" class="form">
... Your message content here ...
... Your input fields here ...
Hope it helps!
[ed. note: Henrik Nielsen last edited this post 9 years, 9 months ago.]
- A small step for mankind, so why not take two...
Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
Thanks Henrik - that worked perfectly.
Nice! Learned something again =)