Welcome to the LimeSurvey Community Forum

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

Show answer options at a later point.

  • Affenbrotbaum
  • Affenbrotbaum's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #244830 by Affenbrotbaum
Show answer options at a later point. was created by Affenbrotbaum
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 3.26.1+210427
Own server or LimeSurvey hosting: LimeSurvey Hosting
Survey theme/template:
==================
Hi there,

I was wondering if it is possible at all to display the answer options of a matrix question only at a slightly later point?

Here is an outline of our prompts, including (3) which we can't get to work.

(1) We need participants to listen to a short audio file (we've managed to embed it by fiddling with the source code/Javascript). Once the recording has played through, we want the audio element to disappear.
(2) A short question is supposed to appear where the audio player was so that participants only read the question after they have listened to the full audio (Again, using javascript, we've managed to make LimeSurvey display the question only after the audio file has ended).

(3) Finally, participants are supposed to answer the question by choosing one out of three options (Matrix question). Per default, LimeSurvey displays the answer options from the start. For our experiment, however, the answer options shouldn't be visible to not bias participants when listening to the audio file.

We can't really think of a solution here, but perhaps someone else has a suggestion.

Thanks ever so much.

Jana


 
Attachments:

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago - 1 year 3 months ago #244832 by Joffm
Replied by Joffm on topic Show answer options at a later point.
Hi, Jana, according to your username I suppose you are able to read and understand German.

In the German part you find my "Tutorial 3: Gimmicks", page (7 ff.)

In (if I remember right) the second chapter you find a solution how to hide and show the "next" button depending on the state of a video.

You can adapt this.

Some long time ago there was a thread about hiding and displaying DIVs, like one containing the video, one containing the question, and the answer container.

Anyway the easiest solution is to show and play the video in a text display.
After the end of it the survey proceeds automatically to a next question.

And as usual the best:
Create a small prototype with this question and send the lss export.

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 3 months ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago - 1 year 3 months ago #244847 by Joffm
Replied by Joffm on topic Show answer options at a later point.
Hi, Jana,
here both options I mentioned before

1. Initially you hide the question text (where you add an id), the "question-valid-container", the "answer-container" and the "next"-button.
After the end of the audio you hide the audio and show everything you hided before.
The script
Code:
<div id="theQuestion">Wie gefällt es denn so?</div>
 
<div id="theAudio">
  <audio controls="" id="myaudio">
    <source src="https://mysurvey.de/userfiles/myaudio.mp3" type="audio/mpeg" />
    Your browser does not support the audio element.
  </audio>
</div>
 
<script type="text/javascript" charset="utf-8">        
    $(document).ready(function() {    
 
        var aud = document.getElementById("myaudio");
        aud.volume=0.3;  // Adapt to your needs
        aud.onended = function() {
            $('#theAudio').hide();
            $('#ls-button-submit').show();
            $('.question-valid-container').show();
            $('.answer-container').show();
            $('#theQuestion').show();
        }
    });
</script>
 
<style type="text/css">
  .question-valid-container, 
  .answer-container, 
  #theQuestion, 
  #ls-button-submit {
    display:none;
  }
</style>


2. You use two questions.
A text display with the audio and the question of your desired type.
After the end of the audio the "next"-button is triggered to proceed to your question.
The script 
Code:
<audio controls="" id="myaudio">
  <source src="https://mysurvey.de/userfiles/myaudio.mp3" type="audio/mpeg" />
  Your browser does not support the audio element.
</audio>
 
<script>
    $(document).ready(function() {    
 
        var aud = document.getElementById("myaudio");
        aud.volume=0.3;
        aud.onended = function() {
            $('#ls-button-submit').show().trigger('click');
        }  
    });
</script>
 
<style type="text/css">#ls-button-submit {
    display:none;
  }
</style>


Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 3 months ago by Joffm.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #244872 by holch
Replied by holch on topic Show answer options at a later point.
Off-topic:

Your LimeSurvey version: Version 3.26.1+210427
Own server or LimeSurvey hosting: LimeSurvey Hosting


The version you are using is now over 2 years old and hasn't received an update, bug fix or security patch since 27.04.2021.

It is really time for an update. In times of GDPR/STVGO running out of date software for collecting data over the internet isn't really a good idea, I think.

And I highly doubt that "Limesurvey hosting" offers such an old version on their servers. It must be hosted somewhere else.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose