Required attributes not working on the default registration form

Hello members, can you kindly also help me with required attribute in the tracker entity default form. I can’t seem to get them working as i can just save the registration without mandatory field and no error. How do we apply mandatory field in the default form?

I guess i might have omitted something in my setting kindly assist.

I’m on version 2.30

2 Likes

Hi @baps,

What are you editing? a tracker program or you are making an entry into a program?

James.

@baps,

You use the term “required” - DHIS2 uses a mish-mash of “Compulsory” and “Mandatory”, but I presume that is what you are talking about.

For the initial saving of a registration any empty mandatory attribute has blocked the saving and displayed a red “Required” marker underneath that/those attribute fields. I’ve just confirmed this in 2.29.

That functionality is fundamentally the same in 2.30, BUT there is a potential catch that is not obvious or displayed in any way:
YOU MUST ENSURE THAT THE AUTHORITY “Ignore compulsory/mandatory settings” (approx name) is set to NO for all users that capture this data.

So verify each of the user roles that your data capturers have, look under the “System” window, and make sure that Ignore … authority is NOT ticked.

Best regards
Calle

3 Likes

Hey @baps - a common way a test user ends up having the authority “Ignore compulsory/mandatory settings” is if you log in with a super user. It is generally not recommended to do your testing of the tracker programs with a super user, so if this is the cause I would advice making a user with targeted authorities for data entry.

Markus

3 Likes

Sorry for the late reply. This happens when i make an entry on a program, mandatory fields are not enforced.

1 Like

Thanks for the reply. I’ll try your solution, believe you have it right. But i will try and revert back.

2 Likes

Thank you for your help. I created another user, assigned a data-clerk to it, gave it it rights to access the tracker program and the entity. Everything works perfect.

Thanks!

2 Likes

Thanks a lot @Markus, your response gave clarity to the answer.

2 Likes