textcat: 2-level hierarchical classification

hi @blue482!

Thanks for your question! This is a good question.

First, it is important to note that (see the docs):

Multiple blocks of the same type are only supported for the text_input and html interface. For text input blocks, you can use the "field_id" to assign unique names to your fields and make sure they all write the user input to different keys. For HTML blocks, you can use different "html_template" values that reference different keys of your task.

[
  {"view_id": "text_input", "field_id": "user_input_a", "field_rows": 1},
  {"view_id": "text_input", "field_id": "user_input_b", "field_rows": 3},
  {"view_id": "html", "html_template": "<strong>{{content_a}}</strong>"},
  {"view_id": "html", "html_template": "<em>{{content_b}}</em>"}
]

So blocks of the same type (i.e., choice / categories), can't be used.

However, this post outlines how to create a simple HTML template (which can be duplicated in blocks) with a checkbox and a small JavaScript script that listens to the checked event of the box and updates the task with whether it's checked.

If you use multiple check boxes, I think it's possible to do something very similar to the multi-level example you showed.

There's an example recipe in that same chain that can get you started:

Can you take a try?

We'd be interested if you're able to make any progress!