Welcome to the LimeSurvey Community Forum

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

Single Survey Link, Multiple Days, Hidden Content

  • markhooten
  • markhooten's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #224589 by markhooten
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition   Version 5.2.12+220131
Own server (Ionos)
Theme: Fruity

==================
Hello!
I need to set up a survey for education program participants to respond at the end of each day with their evaluations of the program.  I would like to set this up with a single URL for the whole week, but hide questions for all except the day they are responding for.  I tried to do this previously but ended up losing many of the responses in the process.
Can you help me find the best way to do this?  Good alternatives?
Thanks!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224593 by holch
One link for all or an individual link for each respondent, but just one link for all the days?

Are the questions different each day or do they respond the same questions every day?

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224596 by Joffm
Check the date in an equation at the beginning.
Display your questions according to this.

But, as @holch, explain your "single Url".

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224609 by tpartner

Check the date in an equation at the beginning.
Display your questions according to this.
I think you will need to hide the questions via JavaScript. If you do it via relevance, the hidden questions won't be recorded.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • markhooten
  • markhooten's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #224613 by markhooten
Replied by markhooten on topic Single Survey Link, Multiple Days, Hidden Content
One link for all participants (not by individual).
One link for all of the days, but we have different questions to be shown on each day.

The reasoning behind this is making it simple for attendees to respond - I set up a QR Code and display and share it at the end of the first day. They access the survey, bookmark the URL and then respond on the following days.

I could set up the QR Code to reflect a different URL each day and then do separate surveys for each day, but I was certain that LS had a functionality I could use instead.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224616 by holch
What sense does a QR code have online? Why not just providing a link? Just wondering.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 4 months ago #224642 by DenisChenu
Replied by DenisChenu on topic Single Survey Link, Multiple Days, Hidden Content

Check the date in an equation at the beginning.
Display your questions according to this.
I think you will need to hide the questions via JavaScript. If you do it via relevance, the hidden questions won't be recorded.
 
If you use relevance : you have to update config : deletenonvalues www.limesurvey.org/manual/Optional_settings/en#Survey_behavior

You can do it survey by survey using gitlab.com/SondagesPro/coreAndTools/DeletenonvaluesBySurvey

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224649 by tpartner

If you use relevance : you have to update config : deletenonvalues www.limesurvey.org/manual/Optional_settings/en#Survey_behavior
Yes, but I believe that would affect all surveys.

My JavaScript solution:

1) Hide all "day" questions by assigning a CSS class "hidden".

2) Place this script in the source of all of those questions, modifying the dayToShow variable as necessary:

Code:
<script type="text/javascript" data-author="Tony Partner">  
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // The day of the week to show this question
    // Sun: 0, Mon: 1, Tues: 2...
    var dayToShow = 1; 
 
    var dayNumber = new Date().getDay();
 
    if(dayToShow == dayNumber) {
      $('#question{QID}').removeClass('hidden').show();
    }
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 4 months ago - 3 years 4 months ago #224702 by DenisChenu
Replied by DenisChenu on topic Single Survey Link, Multiple Days, Hidden Content
> Yes, but I believe that would affect all surveys.

 You don't read just after ;) 

> You can do it survey by survey using gitlab.com/SondagesPro/coreAndTools/DeletenonvaluesBySurvey


Else : but js solution : this don't manage the mandatiry or erro system. make it more complex.

I have a feature request about hidden under condition. It can be done by plugins now (in 5.X)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 3 years 4 months ago by DenisChenu.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224727 by tpartner

 You don't read just after ;) 

> You can do it survey by survey using gitlab.com/SondagesPro/coreAndTools/DeletenonvaluesBySurvey


Else : but js solution : this don't manage the mandatiry or erro system. make it more complex.

I have a feature request about hidden under condition. It can be done by plugins now (in 5.X)

 
Sure, but my solution is for those who cannot install plugins.

Regarding the mandatory problem - this can be handled via question validation. For example, something like this for the question to be answered on a Monday:

Code:
(date('w') != 1 AND (is_empty(self) OR !is_empty(self))) OR (date('w') == 1 AND !is_empty(self))

Sample survey attached:  

File Attachment:

File Name: limesurvey...4(1).lss
File Size:28 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose