
Hi, This is just to let you know the promising results of some experimentation: Formlets are about applicative instances, but what about monadic instances? What a Monad instance of formlets means? I recently experimented with this and the results are very interesting and powerful- It mixes the best of web forms, with the flexibility of console applications. ???!!!!!! Althoug this example is for the formlets of the MFlow https://github.com/agocorona/MFlowframework , it can be ported to other formlet implementations. Although the MFLow formlets include web formatting that is not supported in other formlets implementations. Static HTML templating don´t work well with monadic formlets, so it is important to include the formatting as a part of the computation: import MFlow.Wai.Blaze.Html.All dynamicForm= wform $ do (n,s) <- (,) <- p << "Who are you?" ++> getString Nothing getString Nothing getRadio[radiob "work?",radiob "study?"] <++ br r<-case flag of "work" -> pageFlow "l" $ Left <- b << "do you enjoy your work? " ++> getBool True "yes" "no" <** submitButton "ok" <++ br "study"-> pageFlow "r" $ Right <- b << "do you study in " ++> getRadio[radiob "University" ,radiob "High School"] p << ("You are "++n++" "++s) ++> case r of Left fl -> p << ("You work and it is " ++ show fl ++ " that you enjoy your work") ++> noWidget Right stu -> p << ("You study at the " ++ stu) ++> noWidget hint s= [("placeholder",s)] onClickSubmit= [("onclick","this.form.submit()")] radiob s n= text s ++> setRadio s n add html to the formlet. the operatior http://youtu.be/DryBQc9agFg I hope that you find the idea interesting. If you want to experiment with this in MFlow, I have to say that the implementation of this feature is in an early stage. The code is in the head branch https://github.com/agocorona/MFlow/tree/head Alberto.