Inline-Repeat column title set * for required

Hello everyone.

I am trying to add a * to the column title of my inline repeat.
The inline repeat in the sme is a group with repetitions set to 999.
Then I created a field of type string and tried to enable the required option, but the * is set to the label of this field when I click the add button, which makes sense.
Then I tried adding the annotation “required: true” in the sme to my inline repeat, but that didn’t do anything.

Is there a solution to my problem or can anyone here help me?

Thanks a lot :slight_smile:

Hi @anon44977,

I’m not sure that I understand the problem. I created the following model using 2023.06-ext3 but this shows the expected behavior:

  1. I created a Document Model with a repeatable group, rep [100].
  2. I modeled a required field in the Repeatable group, my_field.
  3. I then created a Form Model and tested the result in the Form Model Preview

As you can see from the attached picture, the column label, my field, has a star. This is true whether I have added rows to this repeat (clicking on the add button) or not.

Does this help you?

Hello @malcolm-silver-ice thanks for your fast reply!

Yes that helps actually, and sorry, I did not realized before, that my Inline-Repeat was converted to a Detached-Repeat…

Hey, just fyi:
From the perspective of accessibility (A11Y), for the solution which @malcolm-silver-ice describes, it is important to use the functions by SME. So it is needed to set a field as required and not just re-name a label “Labelname *”. Only by setting the field to mandatory, the aria-attribute “aria-required=true” is set to the field.
To have then a star * on the column header is fine for A11Y. In a project, I would just recommend using a legend or description somewhere to describe the meaning of the star *.
:slight_smile: