Expand my Community achievements bar.

Mandatory Fields on an expandable Table

Avatar

Level 3

Hi,

I've created an expandable table which contains one mandatory field that is triggered by a button click.

MealCard.CardInfo.CardRange.PCS_ID.mandatory = "error";


By default the field is not mandatory but the click makes the field mandatory. So, when the button is clicked it triggers the red border around the field and if the field is NOT empty, it works fine, and if the field is empty, then it triggers the message saying that "At least one required field is empty..........). So far so good. However, the problem I have is that the code only enforces the rule to the first row. So if the table has been expanded, the mandatory field remains to be the one in the very first row and the next rows are not enforced.

I tried doing it backwards making the field mandatory under the field "Type" and set the code on the button as follows:

MealCard.CardInfo.CardRange.PCS_ID.mandatory = "disabled";


But this time it cleared the red border to the very first row only.

I need to make sure that the code applies to as many instances of that field are created and not only to the first row.

THANK YOU!!!!!!

0 Replies