It seems that when I put a required input into a fori loop it is not marked with a red outline. Here’s my (simplified) code:
{% fori item in custom.risks %}
{% assign RGS_code = item.RGS %}
{% capture filter_accounts %}
{% input custom.RGS_filtering.value as:account_collection range:"B,W" default:"B,W" accounts_var:accounts_used %}
{% endcapture %}
{% assign level2_options = "" %}
{% assign level2_value = "" %}
{% for account in accounts_used %}
{% assign account_sliced = account.number | slice:0,4 %}
{% unless level2_value contains account_sliced %}
{% capture option %}{% t account_sliced %}|{% endcapture %}
{% capture option_value %}{{ account_sliced }}|{% endcapture %}
{% assign level2_options = level2_options | append:option %}
{% assign level2_value = level2_value | append:option_value %}
{% endunless %}
{% endfor %}
{% newline %}
{% capture RGS_code %}{{ item.RGS }}{% endcapture %}
{% assign i = 0 %}
{% capture RGS_code_i %}{{ item.RGS }}{{ i }}{% endcapture %}
{% assign RGS_range = period.accounts[RGS_code] | map:"number" | join:"," %}
{% capture filter_accounts %}
{% input custom.RGS_filtering.value as:account_collection range:RGS_range default:RGS_range accounts_var:accounts_used %}
{% endcapture %}
{% assign level3_options = "" %}
{% assign level3_value = "" %}
|{% input item.RGS as:select options:level2_options option_values:level2_value %}
|{% input item.Risk_description as:text %}
|{% input custom.[RGS_code].risk_remark as:text placeholder:placeholder_flagged required:true %}
{% endfori %}
Now, the last input field should me marked read for all but the last line right? But this doesn’t happen. When I change my code to:
{% for item in custom.risks %}
{% assign RGS_code = item.RGS %}
{% capture filter_accounts %}
{% input custom.RGS_filtering.value as:account_collection range:"B,W" default:"B,W" accounts_var:accounts_used %}
{% endcapture %}
{% assign level2_options = "" %}
{% assign level2_value = "" %}
{% for account in accounts_used %}
{% assign account_sliced = account.number | slice:0,4 %}
{% unless level2_value contains account_sliced %}
{% capture option %}{% t account_sliced %}|{% endcapture %}
{% capture option_value %}{{ account_sliced }}|{% endcapture %}
{% assign level2_options = level2_options | append:option %}
{% assign level2_value = level2_value | append:option_value %}
{% endunless %}
{% endfor %}
{% newline %}
{% capture RGS_code %}{{ item.RGS }}{% endcapture %}
{% assign i = 0 %}
{% capture RGS_code_i %}{{ item.RGS }}{{ i }}{% endcapture %}
{% assign RGS_range = period.accounts[RGS_code] | map:"number" | join:"," %}
{% capture filter_accounts %}
{% input custom.RGS_filtering.value as:account_collection range:RGS_range default:RGS_range accounts_var:accounts_used %}
{% endcapture %}
{% assign level3_options = "" %}
{% assign level3_value = "" %}
|{% input item.RGS as:select options:level2_options option_values:level2_value %}
|{% input item.Risk_description as:text %}
|{% input custom.[RGS_code].risk_remark as:text placeholder:placeholder_flagged required:true %}
{% endfor %}
It works like a charm. Is this expected behavior, am I doing something wrong or is this a bug?