Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Applicative and monadic forms handle both the generation of your HTML code and the parsing of user input. Sometimes, you only want to do the latter, such as when there’s an already-existing form in HTML somewhere, or if you want to generate a form dynamically using JavaScript. In such a case, you’ll want input forms.
These work mostly the same as applicative and monadic forms, with some differences:
You use runInputPost and runInputGet.
You use ireq and iopt. These functions now only
take two arguments: the field type and the name (i.e., HTML name attribute) of
the field in question.
After running a form, it returns the value. It doesn’t return a widget or an encoding type.
If there are any validation errors, the page returns an “invalid arguments” error page.