Container : mandatory attribute

Hello,

On my forms, I have some list with attribute who are marked as mandatory in my Business Data Model. My users have to fill the list by himself (for example, a list of item to buy (the number of elements can be dynamic, that's why I use container)).

When i create a container who will contain the mandatory list, the user can submit the form without fill a single element of my list.

That's because the mandatory attribute only appear when my users add the first element of the list on the container.

You can see what i'm trying to explain here :

https://imgur.com/a/yjfT70U

 

Is it a way to initialize a list in a container with at least one element, or an other way to make impossible to my users to validate forms without fill my list ?

Thanks in advance,

Leo

Hi,

You can use a javascript expression in the disabled property of the submit button:

$form.$invalid || formInput.catalogInput.items.length == 0

In this example if my item list is empty the submit button will be disabled

HTH

Romain