I have a question that asks for entering the phone number of the farmer , but after I deploy the form and try to collect details of the same on Kobocollect, it is not accepting beyond 9 digits(whereas it is accepting 10 digits and more on the web preview). Please help me out on this
Hello @bhoomikaramesh
May be this post can help you
@Dnes Thanks for the help, however the code is working only on web preview, and is somehow still taking only 9 digits on kobocollect app
Could you use this regex in constraint regex(.,‘[0-9]{10}’).
I had checked it and its working on my end. Do let me know if its working or not.
Regards,
Dinesh Dongol
The issue is probably that you are trying to use a integer
question type to store the phone number, but integers are limited to 9 digits. You should use a regular text
question instead, with a numbers
appearance.
From Question Types - ODK Docs
Number text widget
…
It can also be used in place of the Integer widget or Decimal widget if large numbers are needed (the integer widget has a limit of nine digits, and the decimal widget has a limit of 15 characters).
Thank you so much @Xiphware , this works !