Trying to display "MM/DD/YYYY" in answering textbox | XM Community
Skip to main content
Hello all,



I am trying to have the answering textbox display "MM/DD/YYYY" so as to prompt respondents about the expected date format. How can I do that?
You can put add this code in onload function :

`document.getElementById("QR~"+ this.questionId).placeholder = "MM/DD/YYYY" ;`

Hi, I need to do the same. I added this code and it isn't working. Is it possible that the Javascript code is now outdated?
Added here...
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
document.getElementById("QR~"+ this.questionId).placeholder = "MM/DD/YYYY" ;
});


Hi mattcrist ,
The code seems to be working fine. I tried it today on a text entry question and it is coming up correctly
image.pnghere is the preview link of the survey : https://paneledgesandbox.ca1.qualtrics.com/jfe/preview/SV_6QqetJgVGx9rd5k?Q_CHL=preview&Q_SurveyVersionID=current


Hi @NiC,
Thanks for your response. I was trying on a Form Field question type, and it doesn't appear to work on this question type. Once I switched to Text Entry, it worked just fine.
Best,
Matt


Leave a Reply