digestive-functors icon indicating copy to clipboard operation
digestive-functors copied to clipboard

Radios that span a list of forms

Open cimmanon opened this issue 7 years ago • 0 comments

I have a number of forms that contain a list of elements, but I want to be able to force that only 1 of the elements can have a True value for a particular field. Such a case would be for a primary or default value from a dynamic list of user submitted values.

radio_lists

My initial thought was that I could do this without modifications to Digestive Functors by having the value for my radio field be the index value of the associated list item, but that would only work for contiguous values. If I have 4 elements in the list but the list of indices I get back is 2,3,5,9, wanting to set list item 3 to true doesn't work because it ends up being the 2nd element in the list I get back after running the form rather than the 4th.

cimmanon avatar Jul 13 '17 14:07 cimmanon