How to change read_only mood of filed using calculation (if condition)

Dear Kobo Community,

I am writing this text to get a response regarding changing the read_only mood of kobo form filed using IF condition.

Ex.
If my filed has data in it so the filed should be changed to read_only otherwise the field read_only attribute should be false.

Your response will highly appreciated.

Regards

Are you using Collect or Enketo, please? The latter does not yet support dynamic read_only expressions.

1 Like

Thank you so much Wroos for your reply, we are using collect in the field. could you please let me know how we can implement read_only mood change using calculation (if condition).

Regards,

Habibi

You can write a calculation in the read_only cell of the question. The calculation must evaluate to true or false.

You can find an exemple with the search function of this forum, please, Read_only - how to set dynamically and in the ODK documentation Form Logic - ODK Docs.

1 Like

@habibi, kindly please be informed that if you are using the Collect Andorid App you could set a dynamic read_only as advised by @wroos. But if you are using Enketo, then the read_only is static. So it depends on the mode of data collection you are using.

Thank you so much Kal_Lam,

1 Like