# Grouping text categorization choices in custom recipe

**URL:** <https://support.prodi.gy/t/grouping-text-categorization-choices-in-custom-recipe/3070>\
**Category:** Uncategorized\
**Tags:** enhancement, textcat, front-end\
**Created:** [June 24, 2020, 12:08pm UTC](https://support.prodi.gy/t/grouping-text-categorization-choices-in-custom-recipe/3070 "2020-06-24T12:08:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [June 25, 2020, 9:14am UTC](https://support.prodi.gy/t/grouping-text-categorization-choices-in-custom-recipe/3070/2 "2020-06-25T09:14:09Z")

</div>

Hi! There are different ways you could do this at the moment: one would be to use [multiple `blocks`](https://prodi.gy/docs/custom-interfaces#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](https://prodi.gy/docs/custom-interfaces#js-css) 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:

> [@Asking multiple questions in one task (different input types)](https://support.prodi.gy/t/asking-multiple-questions-in-one-task-different-input-types/2990/10):
>
> Thanks a lot! I ended up with an inline function in the html form fields, since when invoking a function that I defined in the JAVASCRIPT variable, I got errors stating that the function was not defined (yet). Not sure why that is, but maybe because the JAVASCRIPT content is inserted into the webpage after all the HTML is rendered and processed? For anyone interested in this solution, a minimalistical HTML in my recipe looks like this: \<input key="{{\_task\_hash}}" type="checkbox" id="checkbox\_i…

---

_[View the full topic](https://support.prodi.gy/t/grouping-text-categorization-choices-in-custom-recipe/3070)._
