[Haskell-cafe] web-routes and forms
jeremy at n-heptane.com
Thu Jan 27 02:22:07 CET 2011
On Wed, Jan 26, 2011 at 4:33 PM, Corentin Dupont
<corentin.dupont at gmail.com> wrote:
> Now turning to digestive functors, I don't see where do goes the "A.action
> actionURL" part that was in traditionnal forms?
> It seems I need it for routing the result of the form.
I think you will find formHtml is returning you the stuff that goes
inside the <form> tag, but does not actually include the form tag
I am not sure how to modify the attrs using blaze-html. I think that
is a missing feature of the digestive-functors-blaze package. In
digestive-functors-hsp there is a function:
setAttrs :: (EmbedAsAttr x attr, XMLGenerator x, Monad m, Functor m) =>
Form m i e [HSX.GenXML x] a
-> Form m i e [HSX.GenXML x] a
setAttrs form attrs = mapView (map (`set` attrs)) form
You probably need something similar for blaze.
More information about the Haskell-Cafe