- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
automatically fill day of week, based on respondents fill in the other form
- MAXINE321319
- Topic Author
- Offline
- New Member
Less
More
2 years 10 months ago - 2 years 10 months ago #216965
by MAXINE321319
automatically fill day of week, based on respondents fill in the other form was created by MAXINE321319
Hi all,
I would like to ask help from you, I am doing a choice survey, in this context, I will show the day to the week to respondents,
How can I make the survey can automatically fill the day of the week in the 8 fill fields (next 8 days), based on the respondent fill the day of today?
for example, in the choice list, there are Monday to Sunday (7 days of the week), respondents need to first choose the day of today, and then the survey can automatically fill the following 8 days.
for example: choose "Friday" for today. Then the survey automatically fills the next 8 days, which should be: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.
will appreciate it a lot if you will help, attached is the HTML I have for now.
Thank you!
I would like to ask help from you, I am doing a choice survey, in this context, I will show the day to the week to respondents,
How can I make the survey can automatically fill the day of the week in the 8 fill fields (next 8 days), based on the respondent fill the day of today?
for example, in the choice list, there are Monday to Sunday (7 days of the week), respondents need to first choose the day of today, and then the survey can automatically fill the following 8 days.
for example: choose "Friday" for today. Then the survey automatically fills the next 8 days, which should be: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.
will appreciate it a lot if you will help, attached is the HTML I have for now.
Thank you!
Last edit: 2 years 10 months ago by MAXINE321319.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 10 months ago - 2 years 10 months ago #216967
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic automatically fill day of week, based on respondents fill in the other form
Hi,
please, only send lss exports of your survey (the relevant questions)
Or, at least, show a screenshot how this second question looks like. What type of question is it?
I could imagine it is some kind of an array, where the subquestions are dynamically filled with these following days.
Joffm
And do not forget to mention the LimeSurvey version you are using.
By the way:
The easiest solution would be to display the following 8 dates.
In this case it is not necessary to select the current day; the current date you get by the function "date".
And you avoid the translatio of the days in multilingual surveys
And also: What is your goal?
Do you want to know what people do, eat, buy, ... on Monday, on Tuesday, ... or do you want to know what people do the next day, the over next day, ...?
This is important. Because you always have to consider how the database will look like. So you may ease your analysis without a lot of restructuring the database.
please, only send lss exports of your survey (the relevant questions)
Or, at least, show a screenshot how this second question looks like. What type of question is it?
I could imagine it is some kind of an array, where the subquestions are dynamically filled with these following days.
Joffm
And do not forget to mention the LimeSurvey version you are using.
By the way:
The easiest solution would be to display the following 8 dates.
In this case it is not necessary to select the current day; the current date you get by the function "date".
And you avoid the translatio of the days in multilingual surveys
And also: What is your goal?
Do you want to know what people do, eat, buy, ... on Monday, on Tuesday, ... or do you want to know what people do the next day, the over next day, ...?
This is important. Because you always have to consider how the database will look like. So you may ease your analysis without a lot of restructuring the database.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 10 months ago by Joffm.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 10 months ago #216968
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic automatically fill day of week, based on respondents fill in the other form
Here a quick example without javascript (only a few equations).
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- MAXINE321319
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
2 years 10 months ago #216970
by MAXINE321319
Replied by MAXINE321319 on topic automatically fill day of week, based on respondents fill in the other form
Dear Joffm,
Thank you so much! Then you remind me that we only need show the following 8 dates, based on the actual dates of the respondents filling the questionnaires.
The goal is, to see what people do the next day, the over next day... the questions or the choice that the respondents will face is: chose the day in the following 8 days, that you will do the "activity 1", for example, grocery shopping activity. we assume that respondents will have different preferences for a different day of the week, and their history activity participation and some assumed systems varied day contexts (e.g. weather). In other words, the choice task is a "table", in which, every row is a day: and shows the day of the week, the weather, and other day contexts of the day, in every final column of the row there is a checkbox, respondents can click to represent their choices to do the "activity 1" on the day, they can click multi-days in the 8 days.
Actually, there are other questions: after their choice, they will be asked on which day(s), you will do the next "activity 2", say: social. in the similar tables (day contexts, etc), but now, the previous choice of the "activity 1" on the last page, will be also auto-fill on the day of the respondent choice.
So, could you please help me to auto-fill the next 8 days in the table? and may also help me to auto-fill the previous choice days of last activities? there are 4-5 activities, respondents need to plan on which days to do them in the 8 days one by one, facing the day context table.
please look at the Html below, which I have so far: thank you!
file:///C:/Users/20171389/Dropbox/2021/limesurvey/table.HTML
best regards,
Max
Thank you so much! Then you remind me that we only need show the following 8 dates, based on the actual dates of the respondents filling the questionnaires.
The goal is, to see what people do the next day, the over next day... the questions or the choice that the respondents will face is: chose the day in the following 8 days, that you will do the "activity 1", for example, grocery shopping activity. we assume that respondents will have different preferences for a different day of the week, and their history activity participation and some assumed systems varied day contexts (e.g. weather). In other words, the choice task is a "table", in which, every row is a day: and shows the day of the week, the weather, and other day contexts of the day, in every final column of the row there is a checkbox, respondents can click to represent their choices to do the "activity 1" on the day, they can click multi-days in the 8 days.
Actually, there are other questions: after their choice, they will be asked on which day(s), you will do the next "activity 2", say: social. in the similar tables (day contexts, etc), but now, the previous choice of the "activity 1" on the last page, will be also auto-fill on the day of the respondent choice.
So, could you please help me to auto-fill the next 8 days in the table? and may also help me to auto-fill the previous choice days of last activities? there are 4-5 activities, respondents need to plan on which days to do them in the 8 days one by one, facing the day context table.
please look at the Html below, which I have so far: thank you!
file:///C:/Users/20171389/Dropbox/2021/limesurvey/table.HTML
best regards,
Max
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 10 months ago #216971
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic automatically fill day of week, based on respondents fill in the other form
Hi,
did you import the sample survey I provided?
Here is another example without the equations.
This way you do not store the names of the days in the database.
But this is not necessary as you have the current day stored.
But you are not very clear here
Yes, this will be true?
But doesn't it mean, you want to know, what they do on Monday, what on Saturday?
The way you ask this question, is different. You ask, what do you do tomorrow (without knowing which day it is).
Imagine an EXCEL sheet with seven columns
1. option
You save the responses for "Monday" in the 1st column, the responses for "Tuesday" in the 2nd, ...
So you can analyse easily what people do on the different days of the week.
2. option
You save the responses of the 1st following day in the 1st column, the 2nd following day in the 2nd column, ...
Now you have the responses for "Monday" spread over all seven columns and you will have to restructure before you are able to analyze it.
At the moment my examples show the 2nd option.
And what shall we do with your HTMl, which contains some css- and js-files located on your environment.
This forum deals with LimeSurvey.
So please, provide a lss export of your LimeSurvey survey.
Joffm
did you import the sample survey I provided?
Here is another example without the equations.
This way you do not store the names of the days in the database.
But this is not necessary as you have the current day stored.
But you are not very clear here
respondents will have different preferences for a different day of the week
Yes, this will be true?
But doesn't it mean, you want to know, what they do on Monday, what on Saturday?
The way you ask this question, is different. You ask, what do you do tomorrow (without knowing which day it is).
Imagine an EXCEL sheet with seven columns
1. option
You save the responses for "Monday" in the 1st column, the responses for "Tuesday" in the 2nd, ...
So you can analyse easily what people do on the different days of the week.
2. option
You save the responses of the 1st following day in the 1st column, the 2nd following day in the 2nd column, ...
Now you have the responses for "Monday" spread over all seven columns and you will have to restructure before you are able to analyze it.
At the moment my examples show the 2nd option.
And what shall we do with your HTMl, which contains some css- and js-files located on your environment.
This forum deals with LimeSurvey.
So please, provide a lss export of your LimeSurvey survey.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- MAXINE321319
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
2 years 10 months ago #216972
by MAXINE321319
Replied by MAXINE321319 on topic automatically fill day of week, based on respondents fill in the other form
the version of LimeSurvey is Version 3.25.21, it seems I can not import the sample survey you provided. cause the verison problem?
The topic has been locked.
- MAXINE321319
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
2 years 10 months ago #216973
by MAXINE321319
Replied by MAXINE321319 on topic automatically fill day of week, based on respondents fill in the other form
because I do not familiar with the LimeSurvey, and I just tried to use HTML and Javascript to have my choice task...and then apply the "source" button to add my "HTML and Javascript ", and I even do not familiar with "HTML and Javascript, CSS.... anyway, thanks for your help, and just please let me know if there is any stuff i did wrong.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 10 months ago #216974
by Joffm
Why? Was there an error message? Please, show it.
Usually you import by clicking this button, select the lss file and click "import survey"
If you do not see this button in the main menue you might not have rights to import. Ask the admin.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic automatically fill day of week, based on respondents fill in the other form
it seems I can not import the sample survey you provided
Why? Was there an error message? Please, show it.
Usually you import by clicking this button, select the lss file and click "import survey"
If you do not see this button in the main menue you might not have rights to import. Ask the admin.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- MAXINE321319
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
2 years 10 months ago #216975
by MAXINE321319
Replied by MAXINE321319 on topic automatically fill day of week, based on respondents fill in the other form
Oh, I imported your example by "import a question"
the file should be .lsq
There is no button to "import a survey ", maybe I need to ask the Admin.
can I import your example by import a question? I already fill all the basic questions in the LimeSurvey system. such as: what is your age, etc.
now I am dealing with the stated choice experiment part, as I said, ask respondents to make choice in the 8 days context. so, I think maybe I can just import the experiment ( 8 days contexts situations) as a question.
how do you think?
In conclusion, I need to show the choice set of the days and ask respondents to choose. the question is a table, shows the day's situations, and respondents can choose the days in the table. I do not know how to add an image to show you in the forum.
the file should be .lsq
There is no button to "import a survey ", maybe I need to ask the Admin.
can I import your example by import a question? I already fill all the basic questions in the LimeSurvey system. such as: what is your age, etc.
now I am dealing with the stated choice experiment part, as I said, ask respondents to make choice in the 8 days context. so, I think maybe I can just import the experiment ( 8 days contexts situations) as a question.
how do you think?
In conclusion, I need to show the choice set of the days and ask respondents to choose. the question is a table, shows the day's situations, and respondents can choose the days in the table. I do not know how to add an image to show you in the forum.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 10 months ago #216977
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic automatically fill day of week, based on respondents fill in the other form
If you can import a question I think you can import a group as well.
I will send an lsg export (lsg = LimeSurvey Group) later.
Joffm
I will send an lsg export (lsg = LimeSurvey Group) later.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 10 months ago #216978
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic automatically fill day of week, based on respondents fill in the other form
And here the lsg export
Base language is "English".
Because lsq and lsg exports are language sensitive, we usually ask for lss exports.
Joffm
Base language is "English".
Because lsq and lsg exports are language sensitive, we usually ask for lss exports.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- MAXINE321319
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
2 years 10 months ago #216985
by MAXINE321319
Replied by MAXINE321319 on topic automatically fill day of week, based on respondents fill in the other form
Hi Joffm,
I import your lsq, thanks. However, I do not know how to adjust it based on my experiment background, so could you please help me to realize the automatically fill the 8 days in my HTML (attached)? is it attached right?
Thanks
Maxine
I import your lsq, thanks. However, I do not know how to adjust it based on my experiment background, so could you please help me to realize the automatically fill the 8 days in my HTML (attached)? is it attached right?
Thanks
Maxine
The topic has been locked.