Dear ODK Community Team,
I hope this message finds you well.
I am currently working on a form where I want to detect if a user has copy-pasted text into a text input field. Since ODK doesn't natively detect copy-paste actions, I have implemented a workaround by tracking the time it takes a user to fill the input. If the input is completed in just a few seconds, it likely indicates that the user pasted the content instead of typing it manually. In such cases, I display a warning message to inform the user that pasted content is not allowed.
However, I am facing some issues with this logic and would kindly ask for your assistance in finding a better or more reliable solution to detect copy-paste behavior in ODK forms, if possible.
In addition, I would like to apply the following constraints to the text input field:
Limit the input to 100 characters maximum.
Only allow text written in Dari or Pashto (i.e., restrict input to certain Unicode character ranges).
Prevent any other characters such as English letters, numbers, or special symbols from being entered.
If there is a way to achieve these constraints using regex, constraint expressions, or custom logic in XLSForm/ODK, I would greatly appreciate your guidance or any examples you can provide.
Text Duration.xlsx (16.4 KB)