Grouping text categorization choices in custom recipe

I want to use a custom recipe to categorize texts, however, i want to group my choices in the UI under different titles. For example:

  1. Single/multiple:
  2. class_1 = single,
  3. class_2 = multiple,
  4. class_3 = none
  5. Shape:
  6. class_4 = round
  7. class_5 = oval
  8. class_6 = etc
  9. Margin:
  10. class_XX = ā€¦

I couldnt find anything related to this in the prodigy read me, and i was hoping that you could help.
Thank you!

Hi! There are different ways you could do this at the moment: one would be to use multiple blocks with a choice UI, and add the different "options" to each block. You could also combine all options into one and use custom CSS or the label names to indicate the grouping.

The only downside is that in all cases, the options would write to the same underlying "accept" key, so you need to allow multiple selection, and you couldn't easily indicate relationships within the grouping (like, only allow one shape and one margin value). I've been thinking about maybe letting th choice UI customise the key it writes to (just like the field_id setting in the text_input interface), so you could have different choice blocks that are either multiple or single choice and store their selection in different properties.

If you want full flexibility, another option would be to use custom HTML and JavaScript and just build your own form with multiple checkboxes / radio button groups. Calling window.prodigy.update lets you update the current task with any custom data, like information about the checkbox that was selected. Here's a straightforward example of a custom checkbox:

1 Like

Thank you so much!

1 Like