Flask & WTForms: How to make a form with multiple submit buttons?

Viewed 31388

Imagine I need to build a travel planning form like this:

Going from [_Picadily_Circus____]
Going to [_Marylebone_____]
(Starting by) (Arriving by) [5]:[30][pm]

Both (Starting by) (Arriving by) are submit buttons. The example is artificial to show a two-button usecase so let's not discuss usability.

How do I do this with Flask and WTForms?

How to see which button was actually pressed?

1 Answers
Related