Maybe someone has a better idea, but I'm doing it with a manually-inserted hidden field. So my hamlet is like
<form target=@{theTarget}>
<input type=hidden name="formId" value="form1">
^{form1Stuff}
...
<form target=@{theTarget}>
<input type=hidden name="formId" value="form2">
^{form2Stuff}
And then my handler for @{theTarget} does something along the lines of
targetHandler = do
form <- runInputPost $ id <$> textField "name"
handleForm form
handleForm :: Text -> Handler ish
handleForm "form1" = do
((result, widget), enctype) <- runFormPost form1
....
handleForm "form2" = do
((result, widget), enctype) <- runFormPost form2
....
If anyone has a nicer idea I would love to hear it!