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

Generating a list of checkboxes

Open cimmanon opened this issue 10 years ago • 0 comments

Digestive Functors lacks a nice way of generating a list of checkboxes. The functionality of radio inputs is almost what I want.

Basically, I have a list of categories in the database. An item is allowed to have any number of categories associated with it or no categories at all. The listOf functionality only gets me the checkboxes themselves, no label text (what is the name of the category associated with this checkbox?). There's no need for JavaScript here at all: all of the options are presented to the user and they are highly unlikely to change between requests.

I ended up hacking together a new splice for retrieving the name of the input element as a text node. It isn't very nice, but it does the job: https://gist.github.com/cimmanon/7215147

cimmanon avatar Oct 29 '13 14:10 cimmanon