Hoogle Search

Within LTS Haskell 24.39 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. generateFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)

    yesod-form Yesod.Form.Functions

    Deprecated: Will require RenderMessage in next version of Yesod

  2. generateFormGet' :: MonadHandler m => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype)

    yesod-form Yesod.Form.Functions

    Since 1.3.11

  3. generateFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m (xml, Enctype)

    yesod-form Yesod.Form.Functions

    Similar to runFormPost, except it always ignores the currently available environment. This is necessary in cases like a wizard UI, where a single page will both receive and incoming form and produce a new, blank form. For general usage, you can stick with runFormPost.

  4. identifyForm :: forall (m :: Type -> Type) a . Monad m => Text -> (Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ())) -> Markup -> MForm m (FormResult a, WidgetFor (HandlerSite m) ())

    yesod-form Yesod.Form.Functions

    Creates a hidden field on the form that identifies it. This identification is then used to distinguish between missing and wrong form data when a single handler contains more than one form. For instance, if you have the following code on your handler:

    ((fooRes, fooWidget), fooEnctype) <- runFormPost fooForm
    ((barRes, barWidget), barEnctype) <- runFormPost barForm
    
    Then replace it with
    ((fooRes, fooWidget), fooEnctype) <- runFormPost $ identifyForm "foo" fooForm
    ((barRes, barWidget), barEnctype) <- runFormPost $ identifyForm "bar" barForm
    
    Note that it's your responsibility to ensure that the identification strings are unique (using the same one twice on a single handler will not generate any errors). This allows you to create a variable number of forms and still have them work even if their number or order change between the HTML generation and the form submission.

  5. mFormToWForm :: forall (m :: Type -> Type) site a . (MonadHandler m, HandlerSite m ~ site) => MForm m (a, FieldView site) -> WForm m a

    yesod-form Yesod.Form.Functions

    Converts a monadic form MForm into another monadic form WForm.

  6. newFormIdent :: forall (m :: Type -> Type) . Monad m => MForm m Text

    yesod-form Yesod.Form.Functions

    Get a unique identifier.

  7. runFormGet :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)

    yesod-form Yesod.Form.Functions

    No documentation available.

  8. runFormPost :: (RenderMessage (HandlerSite m) FormMessage, MonadResource m, MonadHandler m) => (Markup -> MForm m (FormResult a, xml)) -> m ((FormResult a, xml), Enctype)

    yesod-form Yesod.Form.Functions

    This function is used to both initially render a form and to later extract results from it. Note that, due to CSRF protection and a few other issues, forms submitted via GET and POST are slightly different. As such, be sure to call the relevant function based on how the form will be submitted, not the current request method. For example, a common case is displaying a form on a GET request and having the form submit to a POST page. In such a case, both the GET and POST handlers should use runFormPost.

  9. runFormPostNoToken :: MonadHandler m => (Markup -> MForm m a) -> m (a, Enctype)

    yesod-form Yesod.Form.Functions

    No documentation available.

  10. wFormToAForm :: forall (m :: Type -> Type) a . MonadHandler m => WForm m (FormResult a) -> AForm m a

    yesod-form Yesod.Form.Functions

    Converts a monadic form WForm into an applicative form AForm.

Page 587 of many | Previous | Next