For some reason I've been struggling with this, I've made all sorts of attempts and searched a bunch of answers but nothing seems to be working correctly.
Question: There are two buttons on a page that hit two separate endpoints (flask-admin), however the first button (Save button) is always submitted regardless of which button I select. How do I prevent the first button (Save) from executing when I hit the second button (Edit)? What am I doing wrong here?
Note: I would prefer to do this with HTML alone. If there is an answer already out there that I haven't seen I will happily delete this question -- I landed on my current implementation from this answer: Two submit buttons in one form. I just need a little help because I've spent a whole day on this already. Thank you!
Edit: Please please please NO PHP. Thanks :)
<h3> Backtest ID: {{ backtestID }} </h3>
<div class="row">
<div class="col-md-1" >
<form method="post">
<button type="submit" class="btn btn-success"
formaction="{{ url_for('results.save_backtest', id=backtestID) }}">Save</button>
</form>
</div>
<div class="col-md-1" >
<form method="post">
<button type="submit" class="btn btn-info"
formaction="{{ url_for('results.rerun_backtest', id=backtestID) }}">Run</button>
</form>
</div>
</div>