I want to create a question with specific text (no spaces or characters) just capital letters and numbers with no spaces

Dear @Kal_Lam I want to create a question with specific text (no spaces or characters) just capital letters and numbers with no spaces.

This will be the client ID.
Thanks in advanced.

Hi @thelaststylebender,

You can do that by putting regex in your constraint. Here’s the help article about it: Restricting Text Responses With Regular Expressions — KoboToolbox documentation

In your example you need to use:
regex(., '^[A-Z0-9]+$')

edit: code is fixed.

1 Like

It didn’t work
Снимок экрана 2022-06-20 162409

@thelaststylebender,

Sorry, this should work now:

regex(., '^[A-Z0-9]+$')

1 Like

much appreciated dear.

2 Likes