Enter a data in a specified format

Hola a todos y desde ya gracias por la ayuda… necesito predefinir la forma de ingreso de datos en un campo tipo texto… que coincida con la siguiente estructura ##.#.##.#### (donde los “#” son numeros del 0 al 9), la idea es que el usuario ingrese los numeros y se agreguen los puntos por defecto.

En aplicaciones similares lo he logrado agregando una columna en la pestaña survey del xls con el nombre “body::esri:inputMask”, pero aca no me resulta.

Desde ya muchas gracias por la ayuda.

Welcome to the community @Patricio_Andres84! Do you mean, you wish to have a text field where users are able to input a number from 0 to 9 only?

Could you kindly share us a dummy response so that we better understand and see if it’s possible in KoBoToolbox?

La idea es que la respuesta se ingrese obligatoriamente de esta manera.


Is it that all the respondents follow the same format of xx.x.xx.xxxx where x referees to a number.

Asi es, eso es lo que necesito.


Hello @Patricio_Andres84,
Welcome here.
Few more questions, please:

  • Are always ALl (9) digits needed?
  • Are leading and trailing zeros allowed, even needed?
  • Are there other restrictions, like range of digits/numbers?
  • For ex… are, and valid entries
1 Like

Well in this case, you could do it as outlined in the image below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: when a wrong entry is made

Data entry screen as seen in Enketo: when a correct entry is made

Reference xlsform:

Regex.xls (32.5 KB)

Also kindly please be informed that you should be able to see a lot of regex examples in our support article Restricting Text Responses With Regular Expressions.

1 Like