Reputation: 196
I'm trying to use digestive-functors to parse a form with a variable number of dynamically generated inputs, something like this:
<form>
<input type="hidden" name="object-id" value="123">
<input type="hidden" name="object-id" value="43">
<input type="hidden" name="object-id" value="467">
</form>
But am unsure on how to do this. I see there's a listOf
function, but it looks like it requires the input names to have an index in them and be created all at once, which I don't want, since these inputs are being populated dynamically.
The haskell type is something like:
data Form = Form { objectIds :: [Int] }
Any ideas?
Upvotes: 2
Views: 81