Yesod.Form 1.3.3 added checkboxesFieldList
, which provides this functionality.
Array of Checkboxes in Yesod
-
03-07-2022 - |
Question
I would like to create an array of checkboxes in a Yesod Form and get back the answer as Bools (in a list, tuple, or something like that).
This question: Dynamically-Sized List of Fields in Yesod seems to indicate that I need to create a custom field, but the explanation of how to do this in the Yesod Book: http://www.yesodweb.com/book/forms is a little sparse and I can't quite figure out how to build it from there.
Can someone provide a working example of how to put together this kind of form element?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow