Input field format YYYY/MM/DD

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
CyrilleH
Posts: 1
Joined: January 24th, 2023, 8:28 am

Input field format YYYY/MM/DD

Post 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.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Input field format YYYY/MM/DD

Post 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
Post Reply