Unchangeable time and date function

Hi Kobo users,

I am in the need of restriction of time function. I want a user not being able to edit the time. It means that the time function should attach automatically whenever a user reach the time question.

Could anyone help me with this issue?


Hi @chanmony,

You could do it as outlined in the post discussed previously:

Have a great day!

Hello @chanmony
I am not sure if you can control that this is set when the question is reached, Even with now()., calculations fire on load of the form already.
Also when you re-edit the saved case the now() will change, except you use once( now() )… More hints here https://docs.getodk.org/form-logic/#calculations
It might help if you have a condition in your calculation, like if(${var} != “”, once(count()). This will fire when the first entry is made and no more change later.
Maybe @Kal_Lam can give more details.

To provide more support you should specify more exactly what you want to monitor.
An example for the above (form just opened)

And a screenshot from KoBoCollect showing the automatic update on re-edit (just opened)

See last 2 lines. (I was surprised that the references to the now values in the text in Collect are cut down to date and the field values to simple datetime… I am sorry to say, that we feel a bit tired of all these differences between KoBoCollect and Enketo/Preview, often not documented even.)


Thanks so much @Kal_Lam for your responses. It worked now.

1 Like

Thanks so much @wroos for your very detailed information along with the screenshot. I really appreciated for your help.