Hi @adepuk,
It’s not always that you wish to see your variables mandatory (where the variable should be filled, else the filled-up form would not get submitted to the KoBoToolbox server) or optional (where the variable could be left blank and the filled-up form could still be submitted to the KoBoToolbox server). You might sometimes wish to make it mandatory for certain criteria.
It is a form of a mandatory response
if and only if it meets a certain criteria else it would act as an optional response. You could define the required criteria in the text space of the Custom logic
.
For further understanding please have a look at the images shared below:
In the survey tab of your xlsform:
In the choices tab of your xlsform:
Data entry screen as seen in Enketo:
Data entry screen as seen in Enketo:
Reference xlsform:
Custom Logic (Mandatory Response).xlsx (10.4 KB)
Have a great day!