{% set displayInline = not category.enableDescription and not category.singleOption %} {% if displayInline %} {% for option in category.options %} {% if option.displayChildrenInForm %} {% for subcategory in option.subcategories %} {% if subcategory.displayInForm %} {% set displayInline = false %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endif %} {% if category.displayInForm %} {% set categoryDepth = parentDepth is defined ? parentDepth + 1 : 0 %}
{% for key, option in category.options %} {% set displayOption = false %} {% set curr_description = '' %} {% set curr_index = 0 %} {% for optionValue in element.optionValues %} {% if optionValue.optionId == option.id %} {% set displayOption = true %} {% set curr_description = optionValue.description %} {% set curr_index = optionValue.index %} {% endif %} {% endfor %} {% endfor %}
{% endif %}