Submit Button - Scroll down automatically after starting the search

By: Michel Arnaboldi | Asked: 08/28/2022
ForumsCategory: Code HelpSubmit Button - Scroll down automatically after starting the search
Michel Arnaboldi asked 2 years ago
Hi, I created an ad directory with a filter search system. When I start the search, the page remains positioned at the top. On a phone, for example, I don’t see the results of the research at all. I would like the page to go down automatically, once the “submit_botton” has been clicked, at the level of the results display. Thank you for your help. Cordially, Michel
Attachments
2 Answers
Best Answer
Chris AdamsChris Adams answered 2 years ago
Hi Michael, I assume your search form is set to the same URL as the search results page with URL parameters added to filter a view? If so you can add a link and achor to the URL to make the page auto-scroll to the results. E.g. Link: /your-page/search-results/?param1=whatever&param2=information#results On page: <div #id="results"> More info here: https://www.w3docs.com/snippets/html/how-to-create-an-anchor-link-to-jump-to-a-specific-part-of-a-page.html
Michel Arnaboldi answered 2 years ago
Hi Chris, Thank you very much for your answer ! It works very well. Cordially, Michel  

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right