How can extract Html from a WidgetT (HandlerSite LiteHandler) IO () value in Yesod

StackOverflow https://stackoverflow.com/questions/22882245

  •  28-06-2023
  •  | 
  •  

Question

Shalom! I have the following code:

widget_member :: Html -> MForm LiteHandler (FormResult Member, WidgetT (HandlerSite LiteHandler) IO ())
widget_member = renderDivs input_member

handler_home :: LiteHandler Html
handler_home = do
    (widget, e) <- generateFormPost widget_member

Can anyone show how I can extract the Html from widget so that handler_home can return it?

Was it helpful?

Solution

You probably don't want to actually extract the Html; you probably want to call the defaultLayout function. Most examples of using forms take this approach.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top