Skip to content

Instantly share code, notes, and snippets.

@rortian
Created December 28, 2012 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rortian/4394850 to your computer and use it in GitHub Desktop.
Save rortian/4394850 to your computer and use it in GitHub Desktop.
doubleListField :: RenderMessage master FormMessage => Field sub master [Double]
doubleListField = Field
{ fieldParse = parseHelper $ Right . decodeUtf8 . parse json
, fieldView = \theId name attrs val isReq -> toWidget [hamlet|
$newline never
<input id="#{theId}" name="#{name}" *{attrs} type="number" :isReq:required="" value="Hey">
|]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment