I tried it with a fresh template again, and now it works for me as well.
The only thing I changed in the other template was to replace the favicon.ico and the logo.png files with custom ones (in the template editor, which was the approach I still new from earlier versions).
Now I uploaded the custom brand logo using the theme options within the questionnaire settings and it still works.
Thanks a lot for the feedback!!
the structure:
question group:
- question 1 (a video to be watched)
- question 2 (a yes/no question, mandatory)
question 2 only appears when the video in question 1 has finished playing.
I want to make it so that when the user clicks yes or no in question 2, it proceeds to the following question group.
this is the code I have in question 1
Hello,
I'm not able to havw it working:
the structure:
question group:
- question 1 (a video to be watched)
- question 2 (a yes/no question, mandatory)
question 2 only appears when the video has finished playing.
I want to make it so that when the user clicks yes or no it advances to the following question group.
this is the code I have in question 1
<p style="text-align: center;"><span style="font-size:14px;"><strong>Please watch the video.</strong></span></p>
<p> </p>
<video autoplay="autoplay" controls height="350" id="myvideo" widht="500"><source src="video" type="video/mp4" /> browser does not support this</video>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var sID = '{SID}'; //survey
var gID = '{GID}'; // group
var qID = '{QID}'; //question
var qID1 =+qID+1;
var vid = document.getElementById("myvideo");
vid.volume = 0.7;
vid.onended = function() { //when video ends
// Hide video block
$('#question'+qID).hide();
// Show question block
$('#question'+qID1).show();
} //onended
});
</script>
I tried adding the code you gave to both question 1 and question 2 but nothing happens when the yes/no button is clicked. where exactly should I add it? thanks
I have to add that I am not using the 'radio' but the 'button group'
What is "the button group"? Never heard of that within Limesurvey.
Maybe upload a screenshot, or even better, provide a LSS file of just the relevant questions for this problem (copy your survey, delete everything that is not relevant).
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.
Hi, sorry. When you create a Yes/No question, under Display you can choose between "Button Group" or "Radio List".
What element do I have to target in js if I am using the buttons instead of radio?