Automatical Scroll down on Submit Button

By: Michel Arnaboldi | Asked: 09/04/2022
ForumsCategory: General questionsAutomatical Scroll down on Submit Button
Michel Arnaboldi asked 2 years ago
Hi, I created an ad directory with a filter search system. When I start the search (click on “Submit Button”), I would like the page to automatically scroll down under the Submit button, to position itself at the level of the results display. Contacted about this, Formidable Forms support wrote to me: “You will need to modify the redirect URL in your search form - the anchor link should be added to the URL before the parameters that you are passing.” Here are the parameters of my form : ON SUBMIT, Redirect to URL : https://merci-la-vie.com/a-decouvrir/espace-sante/#results?pays=[83 sanitize_url=1]&region=[84 sanitize_url=1]&activite=[114 sanitize_url=1]&ville=[122 sanitize_url=1] When I insert the anchor into the URL, the filter system no longer works. Can anyone help me solve this problem (make the automatic scrolling down active)? Thank you for your help, Michel
3 Answers
Chris AdamsChris Adams answered 2 years ago
Hi Michael, The anchor link should come AFTER the URL parameters. E.g.
https://merci-la-vie.com/a-decouvrir/espace-sante/?pays=[83 sanitize_url=1]&region=[84 sanitize_url=1]&activite=[114 sanitize_url=1]&ville=[122 sanitize_url=1]#results
Hope that helps 
Michel Arnaboldi answered 2 years ago
Hi Chris, Thank you for answering. I asked the support of Formidable Forms where the anchor had to be inserted, and they made it clear that it had to be before the parameters for the scrolling down to work. For the display of my View, in my page I only inserted : [display-frm-data id="2975" filter="1"]. If the proposed solution works, I wonder where to insert the <div id="results"> tag in my page so that the display goes below the Submit button. Sincerely, Michel
Chris AdamsChris Adams replied 2 years ago

Hi Michel,

There are various ways you can add an ID to an element on the page.

One option is to wrap your view shortcode in a div like this: [display-frm-data id="2975" filter="1"]

Another option is to add the div to the view somewhere although this will depend on how your view is set-up but you could add an opening at the very start of the 'Before Content' section and a closing at the end of the 'After Content' section.

Hope that helps

Michel Arnaboldi answered 2 years ago
Hi Chris,  Thanks again for your help. The solution you proposed at first works when I place the anchor and the view shortcode into the div tag as follows :
<div id="results">[display-frm-data id="2975" filter="1"]</div>. 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