creating phone number forms on Kobo

813 views
Skip to first unread message

Thulani Gebuza

unread,
Mar 7, 2016, 8:22:34 AM3/7/16
to Kobo Users
Good day

I am having a bit of a problem regarding building a form where only 10 digits can be accepted.

I have an open ended text form with the following script to limit the number of digits accepted:- regex(., '[0-9]') and string-length(.) >= 10 and string-length(.) <= 10.

The script above does not seem to work. Please advise on how to correctly build this

Thulani

Andy Simpson

unread,
Apr 5, 2016, 7:35:26 AM4/5/16
to Kobo Users
Hi Thulani, 

We have had the same issue. The way I got around this was
  • create the phone number as a Text question
  • Under settings ->Appearance (Advanced) ->Select Numbers

Tino Kreutzer

unread,
Apr 5, 2016, 9:24:18 AM4/5/16
to kobo-...@googlegroups.com
Hi Andy and Thulani,

Integer questions are limited to 9 digits, while text questions can take much longer entries. Here's some more information on limits with number questions and how to store larger numeric strings: http://support.kobotoolbox.org/customer/en/portal/articles/2103790-limits-on-number-and-text-responses

Best,
Tino

--
You received this message because you are subscribed to the Google Groups "Kobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.
To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kobo-users.
For more options, visit https://groups.google.com/d/optout.

Hamed Rawand

unread,
Apr 24, 2016, 4:00:59 AM4/24/16
to Kobo Users
Hi Thulani,
you can use this script:
regex(., '^[0-0][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$')

I've used it and works fine for me.
Reply all
Reply to author
Forward
0 new messages