Mandatory after specific date

How can I make a question in a form that this field is mandatory after 3 days or 4 months if the person didn’t fill it after that day so the form have to be deleted?

Hi @kawo786,

Would you mind explaining your issue with a suitable example so that we could better understand your requirements.

Have a great day!

I want to make a health database form, so when the doctors will use this database then they have to take x-ray, test the blood and other stuff, so they cannot fill that fields which are for result of x-ray and blood test, they have to wait few days for the result so I want to make a constraint that these fields have to be optional but after 3 days they have to mandatory and if they didn’t fill those fields so the form have to be deleted

Are you assuming that the doctors may take 3+ days between starting and completing/submitting the same form?

You can certainly add a constraint that a specific question becomes mandatory X days after some other captured date (relevant conditions can in fact be arbitrary XPath expressions), but that assumes the form sits incompleted, on the same device, for several days… (which doesn’t sound like what you want).

Xiphware It is not just about one field I have several fields which have the same problem,
I have given an example also in above, one field have to give warning after 6 months that you didn’t filled this field so please fill it else the form will be deleted. and so on… one field have to give warning after 3 months.

This sounds like you are trying to maintain a ‘state’ (eg Q3 was filled or not) against a specific entity across multiple surveys, correct? (as opposed to conducting a single in situ survey, but which may takes 6 month between starting and submitting…). If so, that probably falls into the category of a longitudinal survey, for which support is forthcoming in ODK Collect (and hence KoboCollect) but not readily present in the current version, although you can sometimes fudge it via pulldata or data preloading.

You might be interested in following the ongoing ODK discussion thread on this feature.