Flatpickr not saving data with Simple Layout | XM Community
Skip to main content

I can get it to display using:

Qualtrics.SurveyEngine.addOnload(function()
{
jQuery("#question-"+this.questionId+" .text-input").flatpickr({
    dateFormat: "Y-m-d"
});

});

 

But upon answering the new question the date question’s data is deleted? See GIF below.

 

 

Bumping this up hoping that it was lost in the holiday weekend.  Thank you!


Sorry desperately bumping this back up for any guidance 


Hi @Radam ,

I tried your code in my survey and it didn't work  (maybe you are using different layout).
If not can you try below code and update as below .
I have two Text entry question on a page , first one is  flatpicker and other one is  normal text entry.
The below JS code works perfectly for it , can you try and let me know:

 

Qualtrics.SurveyEngine.addOnload(function()
{

jQuery(".InputText").eq(0).flatpickr({
dateFormat: "Y-m-d"
});


});

Qualtrics.SurveyEngine.addOnReady(function()
{

});

Qualtrics.SurveyEngine.addOnUnload(function()
{

});


 



Hope it resolves your query😊!!


I still doesn’t work for me in the Simple Layout, thank you for the help though! 


Hi @Radam ,

You can check work around provide by @Tom_1842  on below link for simple layout.

 

While in the meantime , I am trying to find if there is a  workaround  without using embedded data.

Hope it resolves your query😊!!


Leave a Reply