Flatpickr not saving data with Simple Layout | XM Community
Solved

Flatpickr not saving data with Simple Layout

  • 22 November 2023
  • 5 replies
  • 98 views

Userlevel 5
Badge +31
  • Level 4 ●●●●
  • 164 replies

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.

 

 

icon

Best answer by qualtrics_nerd 22 December 2023, 19:36

View original

5 replies

Userlevel 5
Badge +31

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

Userlevel 5
Badge +31

Sorry desperately bumping this back up for any guidance 

Userlevel 5
Badge +19

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😊!!

Userlevel 5
Badge +31

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

Userlevel 5
Badge +19

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