Yesod Problem - passing values inside a route

Below I have an example from the Yesod https://www.yesodweb.com/book/forms book. The form action maps to a route. How do I pass a value to that route. I know it has something to do with ^ but I can't see to make it work right. {-# LANGUAGE MultiParamTypeClasses #-}{-# LANGUAGE OverloadedStrings #-}{-# LANGUAGE QuasiQuotes #-}{-# LANGUAGE TemplateHaskell #-}{-# LANGUAGE TypeFamilies #-}import Control.Applicativeimport Data.Text (Text)import Yesod data App = App mkYesod "App" [parseRoutes|/ HomeR GET/input InputR GET|] instance Yesod App instance RenderMessage App FormMessage where renderMessage _ _ = defaultFormMessage data Person = Person { personName :: Text , personAge :: Int } deriving Show getHomeR :: Handler Html getHomeR = defaultLayout [whamlet| <form action=@{InputR}> <--- problem line -- want to do this

I'm on mobile now, but you want to use the ^?{} syntax which allows you to
pass a pair of route and query string parameters. There's an example in the
Shakespeare chapter of the book.
On Sat, May 27, 2017, 8:34 AM Michael Litchard
Below I have an example from the Yesod https://www.yesodweb.com/book/forms book. The form action maps to a route. How do I pass a value to that route. I know it has something to do with ^ but I can't see to make it work right.
{-# LANGUAGE MultiParamTypeClasses #-}{-# LANGUAGE OverloadedStrings #-}{-# LANGUAGE QuasiQuotes #-}{-# LANGUAGE TemplateHaskell #-}{-# LANGUAGE TypeFamilies #-}import Control.Applicativeimport Data.Text (Text)import Yesod data App = App
mkYesod "App" [parseRoutes|/ HomeR GET/input InputR GET|]
instance Yesod App
instance RenderMessage App FormMessage where renderMessage _ _ = defaultFormMessage data Person = Person { personName :: Text , personAge :: Int } deriving Show
getHomeR :: Handler Html getHomeR = defaultLayout [whamlet| <form action=@{InputR}> <--- problem line -- want to do this
participants (2)
-
Michael Litchard
-
Michael Snoyman