flex-tasks
Safe HaskellNone
LanguageHaskell2010

FlexTask.ConvertForm

Synopsis

Documentation

getFormData :: Rendered Widget -> IO ([[Text]], HtmlDict) Source #

Extract a form from the environment inside an IO context. The result is a tuple of field IDs and a map of language and internationalized html pairs.

This is an internal function used in the Autotool Flex-Task implementation. You should never need to call this function yourself. Use unsafeGetFormData instead.

unsafeGetFormData :: Rendered Widget -> ([[Text]], HtmlDict) Source #

Extract a form from the environment. The result is a tuple of field IDs and a map of language and internationalized html pairs.

Intended to be used for Autotool's task interface.

Warning: This function employs unsafePerformIO! It should nevertheless be safe to use as long as no lifted IO actions are executed while building the Rendered Widget argument. This will always be the case for generic forms. For custom forms, the user is responsible for making sure such calls are avoided or considered "safe".