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?

Was it helpful?

Solution

Yesod.Form 1.3.3 added checkboxesFieldList, which provides this functionality.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top