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.
Kal_Lam
November 12, 2020, 3:10pm
2
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. 13.3.02.0045.
Saludos.
Kal_Lam
November 12, 2020, 3:46pm
4
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.
Saludos.
wroos
November 12, 2020, 5:44pm
6
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 00.0.00.0001, 10.0.00.0000 and 09.9.99.9990 valid entries
1 Like
Kal_Lam
November 13, 2020, 5:14am
7
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