'How to add Bootstrap 5 Scrollspy or Javascript offset to a Django Form Submit Button?

I am using Django / Bootstrap 5 to create a form that generates charts and text results based on the users' input in a Form. The information is displayed below the form itself after pressing the button below:

<button type="submit" class="btn btn-success btn-block">Compare Costs</button>

However, I am trying to add a Scrollspy or similar offset function to this to scroll the window down to the actual results after pressing it (now it just keeps the view at the top of the page). Based on Bootstrap docs this is only possible in the <a> tags, which does not work for the actual form submission (type="submit").

Any way I can make it to either scroll the page down or Offset the page at the same time as the Form user input is submitted? Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source