Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Cannot insert the datetimepicker into the array text question

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 10 months ago - 2 years 10 months ago #225655 by LISHANGQI
Please help us help you and fill where relevant:
Your LimeSurvey version: [3.28]
Own server or LimeSurvey hosting: Own server 
Survey theme/template: fruity
==================
Hi all, 

I'm trying to insert a datetimepicker into an array text question, following the instruction of Tony partner in this post:  forums.limesurvey.org/forum/can-i-do-thi...imesurvey-3-x#211351 , and also Joffm's Tutorial Q1b, but both of them doesn't work even in their own lss file. 

I noticed that one part of code is abnormally shown on the page of the question summary so I guess maybe this is related to the problem:
"$('#datetimepicker_'+thisID+'').datetimepicker({ useCurrent:true, allowInputToggle: true, format:'DD.MM.YYYY' }); }); }) .fail(function( jqxhr, settings, exception ) { console.log(exception); }); });" 
  
I was wondering is it because of the different Limesurvey versions?  And may I ask if anyone know how to fix this problem? 

Thanks a lot in advance!
 
Last edit: 2 years 10 months ago by LISHANGQI.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #225662 by Joffm
Hi,

but both of them doesn't work even in their own lss file. 

is not the best description.

Did you check, if the variable "rootPath" is set correctly?
Did you check, if the necessary files are really there?
rootPath+'assets/packages/bootstrap/plugins/datetimepicker/build/css/bootstrap-datetimepicker.min.css'      
rootPath+'assets/packages/bootstrap/plugins/datetimepicker/build/js/bootstrap-datetimepicker.min.js'


By the way: the picker in column 4 wasn't there. And you have to change the format.

And to be honest: 
Do you really want to present this page to the respondents?
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 10 months ago - 2 years 10 months ago #225684 by LISHANGQI
Hi Joffm,

Thanks for your reply!

Sorry, I didn't realize that these are plugins that need to be installed in advance... I'll try it.

This is an idea for collecting travel dairy for one day and I'm testing the technical feasibility in limesurvey. I would appreciate it if you can give me some comments or suggestions on it!
Last edit: 2 years 10 months ago by LISHANGQI.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #225692 by tpartner

Sorry, I didn't realize that these are plugins that need to be installed in advance

These are core assets so should already exist.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LISHANGQI

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #225701 by Joffm
Hi,
and I didn't say, that they have to be installed.
Only make sure that nobody removed them. 

And suggestions?
There are some not necessary columns, like trip and stage.
You could have a question of this type for each of the four trips.
And it is not necessary to answer the stage number, as the first row is stage 1, the second row stage 2, ..., especially because the button says "Add trip stage"
You ask "start time", "end time" and "duration". But you can calculate one of them by the two others.
This way you save 3 columns.
And you may use different col widths.
 

BTW:
Why can't I drive alone to the train station to travel to Almere?
How do I enter this?




 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 10 months ago - 2 years 10 months ago #225720 by LISHANGQI
Sorry, I don't know how to quote your comments.

Thanks for your suggestions, then I understand that you mean this table contain too much content,  so you said:
"And to be honest:  Do you really want to present this page to the respondents?"

As for your question: "Why can't I drive alone to the train station to travel to Almere?"

We define a trip as traveling only for one purpose. So if you travel to Almere for visiting family, you should report: trip1 stage 1 drive to train station (waiting time will be READONLY).  trip1 stage 2,  take a train to Almere . Trip1 stage3, take a bus to the house of your family. 

BTW, does the datepicker of my survey works without any modification from you after you load it in your system?  Maybe it is also a bug of version 3.X? I found this:  bugs.limesurvey.org/view.php?id=13322
Last edit: 2 years 10 months ago by LISHANGQI.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #225738 by Joffm
You did not understand my issue.
There is only the option "To get to airport or train station for international traveling"
and there is no option "for national travelling"; therefore I used the town of Almere.

And another possible misunderstanding may be "only with child", "only with adult" "both".
When I am alone, what do I have to select? "Only with adult" could be correct, because only an adult is travelling, but I doubt that respondents will follow this way of thinking.
Because "Only with child" could mean, only a child was travelling.

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 10 months ago #225750 by LISHANGQI
Thank you, I see. Yes as I'm still trying to transfer my previous one-by-one form of questions into this table-form, some of the questions and options still need to be adjusted. The purpose for the different stages of the same trip number should always same, base on your tutorial I think this is also possible. And the question for the travel party is meant to ask if they have fellow travelers how many juveniles.

My current work is to explore the way to change my previous one-by-one questions to this table, and I'm stuck at this date-time picker...that's it.

Danke vielmals!

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 10 months ago #225833 by LISHANGQI
Hi Joffm,

Sorry for bothering you, may I double-check with you? Do you mean that the date picker in my uploaded file works well without any change from you? I've tried all the sample surveys from this forum and none of them work, the cells for datepicker are empty when I previewed the survey, but the icon will be shown if I preview the question. Also, the mask question of date/time works properly so I really don't understand why...

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago - 2 years 10 months ago #225834 by Joffm
This is my proposal. (only two trips, extend to four)
 

File Attachment:

File Name: limesurvey...6759.lss
File Size:75 KB

And if the datepicker doesn't work, okay, use a normal text input with validation.
By the way: this is much easier to enter for the respondent than to adjust the picker.

I wouldn't waste more time with this simple question.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 10 months ago by Joffm.

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 10 months ago #225837 by LISHANGQI
Thank you very much, I give up on this picker tool.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #225839 by Joffm
You may use the text input, and show a placeholder and/or an input mask.
Additionally a validation with "regexMatch" and of course you have to make sure that there is no overlap, neither in trips nor in stages.

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose