ItemSet and occurences

Enonic 7.3

According to your doc here: it’s possible to set occurrences minimum=“1” on the item-set itself.



But even though the input-fields are empty (label and phone number), it’s still possible to publish the article.

So, we would like to see that if the item-set has occurrences minimum=“1”, then at least ONE of the input fields must be filled out before it can be published (regardless which one).

Or is it some other way to achieve this?

Simply make one, or both of the inputs in the item set mandatory, and this will work fine.

Thanks for the reply, I know that if we make one of the inputs mandatory , then this will work. But my question is: Is it possible (a new feature) to make the item-set itself mandatory, but none of the inputs mandatory. BUT we cannont publish until one of the inputs is filled out.

BTW: What is the logic behind making a item-set mandatory, but without filling out any inputs?

A mandatory itemSet is always expanded by default, and cannot be removed. I also believe we actually store the values of the empty fields in the inputSet as well (but have to validate that).

I guess you are essentially looking for a new functionality of saying “one-or-more-of-these-inputs” must be filled in before content is valid, and this is not strictly limited to use in item-sets.

Hi Eivind! Looking closer at this issue, you can simply use a OptionSets instead of an itemset. With optionsets you can specify that at least one option must be selected :slight_smile: