Page 1 of 1

Input field format YYYY/MM/DD

Posted: January 24th, 2023, 8:34 am
by CyrilleH
Hello Dear All,
For a survey using dates, I would like to force the user to enter the date in YYYY/MM/DD format.
my question is how to insert a slash / after entering the year in the same field.

Thanks
Sincerely, Cyrille H.

Re: Input field format YYYY/MM/DD

Posted: January 24th, 2023, 10:19 am
by sherrell
Hi Cyrille,

Are you trying to capture the date as a single field? For it's really much better to capture them as 3 separate fields. You can make the date the parent item, and the Y, M, and D as subitems. In that way you have built-in control as to what the user can enter (i.e., you can define ranges for the separate fields): https://www.csprousers.org/help/CSPro/sub_items.html

If you are capturing this data on an Android device, you can "block" the 3 fields so that they appear together on the same screen:

https://www.csprousers.org/help/CSPro/blocks.html

Did you want a '/' to appear in the data file, or are you just inquiring about this as you want to use it as a separator character to parse the string? In which case, if you do the above, that's no longer necessary.

Sherrell