Maximum number of characters in text questions

Hello!! I’ve read that the text question type can have 1mb, but when one of my coordinators try to describe the activity it can only hold until 1900 characters, is there a way I can get more capacity for this specific question? Or what is the maximun? If I paste the text that she tryed to upload in the text question in a Word document, its only 13kb, I need at least 500kb or so.

Thank you in advance!

Hello,
just in case you haven’t seen this yet: :
https://docs.opendatakit.org/aggregate-field-length/
(and the < 1 MB in: http://support.kobotoolbox.org/en/articles/592374-limits-on-number-and-text-responses)
and a 2000 limit for Enketo:
Word limit in text response field in Kobo forms
Have a nice week!

1 Like

Well, now I’m very worried :sob: I have to use Enketo because my form is in Grid Theme and that’s the only way it will work.
Now I’m seeing a 255 limit? I’ll have to check the already sent forms to see if there’s lost information :pleading_face: :sob: It says there there’s a way of changing something in Enketo to get more characters, but I don’t seem to get it :disappointed:

Hi @analucia_espinoza,

Adding up to what @wroos has outlined above, would like to document more information on the character limit with Enketo,

Enketo at the moment supports only 2000 characters of text input (which includes space). If you try typing in Enketo, you will notice that you won’t be able to type any characters when it reaches the threshold limit (2000 characters). If you try pasting a text (which is more than 2000 characters) in Enketo, you will be able to paste only 2000 characters while the exceeding characters gets truncated automatically (which the user won’t notice and assumes that s/he was able to paste beyond the threshold level).

Discussions are ongoing on what can be done to best resolve the issue (like the one you have raised here). Till then would you mind trying out the following workaround (regex example as shown below) as advised by @stephanealoo so that the enumerators during data collection would know exactly when to stop, as they are not able to exceed certain number of characters during a text input.

Using regex to control the character input:

Use regex(., '^[\d\D\s]{1,1999}$') to control the input to 1999 characters (as 2000 is a default threshold where regex fails).

Have a great day!

1 Like

Hello,
Thanks! Can’t we use string-length(.) < 2000 here? Any restrictions/disadvantages compared to the regex.?
Does this regex allow/include newlines?
Kind regards

1 Like

Hi @wroos,

Thank you for adding to the post and helping us in documenting the community discussions with different views and perspectives.

Yes the string-length(.)<2000 definitely works as an alternate with no restrictions and disadvantages compared to the regex discussed earlier (for this particular scenario)! However, regex would be more powerful if you require control with certain character inputs viz. numbers, alphabets, wild cards etc. which the string-length would not be able to do (e.g. with string-length you are able to use numbers, alphabets, wild cards etc but not able to use only numbers or alphabets or wild cards following a specific format/pattern which the regex would support far better).

Regarding your query:

Principally the regex provided above should also support line break but does not work on this platform (Enketo as well as Collect android app).

Have a great day!

1 Like

Weird, because I just tried entering 22000+ characters into a text box and it worked fine (Enketo). Have there been any updates to the code after this discussion?

Also I’m running Kobotoolbox on my own server, if that makes a difference.

1 Like

@ks_1, it should now support more characters then before. Thank you for the updates. Maybe this support article Limits on Number and Text Responses should also be helpful.

1 Like