Having a Field Form Question with Both Forced Response and Specific Date Format | XM Community
Skip to main content

Hello all!
I have this problem where I want to do both things in one question to keep the survey uniform but the only solution I can see is separating the form question into two separate questions. I have 6 fields being filled in: First Name, Middle Name, Last Name, Preferred Name, Age, and DOB (Date of Birth). First Name and Last Name are forced response, Age is required to be a numeric value and DOB is required to be in a mm/dd/yyyy format.
Capture.PNG
The issue is that I want DOB to be forced as well, but I cannot force the full form field question since not all respondents have a middle or preferred name. Besides separating the Age and DOB fields into their own question, has anyone found a way to force a date to be answered AND in a specific format? And if not, which Qualtrics overlord do I pray to to make it a feature in Qualtrics?🙏
Thanks!
Royce Spilker

Hi genkikun,
You can do custom validation but it requires a little bit of programming. This thread here is actually a really good example you should be able to follow along.
The tricky bit for you will be validating the date format. Dealing with dates and times in programming is generally notorious, and JavaScript has its own set of quirks on top of that. This StackOverflow answer addresses a problem similar to yours, otherwise some Googling should help you find your way.
Good luck!


Also, you can request new features here :)
https://community.qualtrics.com/XMcommunity/categories/product-ideas


genkikun ,
The other option is to use JS to force a valid date to be entered in the date field using something like flatpickr or cleave.js.


Leave a Reply