Restrict an entry with upper case and special characters while entering a form

I have the same problem and I’d like you to help me. I want the input to be in uppercase only, and also allow, special characters such as “?”, “!” and “,”.

For example: A L’ECOLE, QUE FAIS-TU?

Hi @PEHAN,

Welcome to the community! You could do the same following the instructions outlined below:

In the survey tab of your xlsform:
Image 1

Data entry screen as seen in Enketo: With a wrong entry
Image 1

Data entry screen as seen in Enketo: With a correct entry
Image 2

Reference xlsform:
UPPER CASE (Regex).xlsx (10.1 KB)

Have a great day!

1 Like

Hi @Kal_Lam.
Many thanks.
It works well , but at the end of text, i must put a space for have the permission to go next question.
For example, if i write “NO”, it can’t go next question. I must write "NO ".

Is there a way to resolve this problem?

Hi @PEHAN,

Would you mind explaining me why you should need a space to go to the next question when you already have an option to swipe if you are using KoBoCollect android app and a mouse pointer if you are using Enketo.

Have a great day!

1 Like

Consider the example you gave me earlier. On the phone, when you don’t put a space after the question mark (?), you can’t go to the next question.

For example, if i write [DA], i can’t go to the next question. But if i write [DA ], i can go to the next. Please, don’t take account []. I want to let you see the difference.

1 Like

Je n’ai pas besoin d’un espace pour aller à la question suivante. C’est le code qui me l’impose. J’aimerais donc avoir la solution pour ne pas mettre d’espace après le dernier caractère.
Merci

Hi @PEHAN,

It seems to be an issue with the Collect android app as it is working smoothly in Enketo.

Any thoughts on this @martijnr, cc: @Xiphware.

Have a great day!

Ok! ça peut etre une possibilité.
Merci beaucoup pour ton appui

1 Like

Dear @Kai_lam,
Sorry, it seems to be a problem with the regex expression. It also doesn’t allow a single Uppercase WORD, like “ABC”. A white space should NOT be mandatory.
image
Have a great week! :slightly_smiling_face:

Hi @PEHAN,

As a backup you could also have a look at the post discussed here which should help you convert all the entries made in lowercase automatically to uppercase:

Have a great day!

1 Like