Choiceモジュールを作成して、ラジオボックスにてコンテンツの切り替えを行っていたのですが、チェックボックスのように複数選択した場合のif文の書き方を教えていただきたいです。
セレクトの時に実装したコードはこちらです
{% if attribute.name == module.choice_field_cat %}
作成したモジュールはこちらです。
[
{
"choices": [
[
"AAA",
"AAA"
],
[
"BBB",
"BBB"
],
[
"CCC",
"CCC"
],
[
"DDD",
"DDD"
]
],
"default": [],
"display": "select",
"display_width": null,
"id": "219775ed-f7bc-3801-cd9a-df13be27c125",
"label": "属性",
"locked": false,
"multiple": true,
"name": "choice_field_cat",
"preset": null,
"reordering_enabled": false,
"required": false,
"type": "choice"
},
{
"choices": [
[
"職種1",
"職種1"
],
[
"職種2",
"職種2"
],
[
"職種3",
"職種3"
]
],
"display": "radio",
"display_width": null,
"id": "7dd67aa7-0e10-e0ff-bc5d-573bc08749db",
"label": "職種",
"locked": false,
"multiple": false,
"name": "choice_field",
"preset": null,
"reordering_enabled": true,
"required": false,
"type": "choice"
}
]