Customize Authenticator field with flatpickr | XM Community

Customize Authenticator field with flatpickr

  • 16 November 2022
  • 6 replies
  • 77 views

Badge +2

Hello! I've been happy with using flatpickr for questions in my surveys with this guidance (https://community.qualtrics.com/XMcommunity/discussion/8850/embedding-flatpickr-into-the-survey), and want to do the same thing for a the secondary field in an authenticator. The first field is the ExternalDataReference, but the second is a birthdate, and I want to limit data entry errors pertaining to date format. Unfortunately, my Javascript is limited.
Where would I put the script to reference the authenticator field?


6 replies

Userlevel 7
Badge +36

erinkru
You can do it by making a separate block and include 1 question for the Date. Ask the date in the same manner as you are doing in other questions. The below setup should help you set it up
image.pngHope it helps!

Userlevel 5
Badge +20

Thank you erinkru!! You've just asked about the very thing I'm trying to work out as well!
Deepak - appreciate your input. I can see that working when you want the respondent to select a date value from a question and then pre-fill that value into an Authenticator field. However what I suspect erinkru is seeking - much like myself - is to directly customise the Authenticator field so that it leverages Flatpickr for data entry. Basically, if the Authenticator screen is the first thing that a respondent sees, how could we directly modify the Authenticator field such that it leverages Flatpickr to manage data entry of a date value?
Thanks in advance.
Cheers,
Cameron

Userlevel 7
Badge +36

erinkru , CamM
If you need to modify the authenticator question you can include the entire below code in the Header>Source. Here I have included it for the first field if you want to change it to second input field change to eq(1).


Hope it helps!

Badge +2

This works, thank you! I actually used both solutions. The first gives me a little more control over what they see initially, but there are still guard rails on the date field if they enter the wrong information and are directed to the regular authenticator.

Userlevel 5
Badge +20

Thanks Deepak - works like a dream! 🤘
Thanks again erinkru for posting this - honestly, the timing of your question couldn't have been more ideal 😁

Userlevel 7
Badge +36

AmaraW
Can you please help here as the person is unable to accept?

Leave a Reply