- Posts: 13982
- Thank you received: 4272
Ask the community, share ideas, and connect with other LimeSurvey users!
Qcode.gseq the sequential number of the group, starting from 0 {gender.gseq}
<script src="https://cdnjs.cloudflare.com/ajax/libs/inputmask/4.0.9/jquery.inputmask.bundle.min.js"></script> <script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ $('#question{QID} input[type="text"]').inputmask({ 'mask': '9999 AA', 'placeholder': '_', 'removeMaskOnSubmit': false, 'rightAlign': false, }); }); </script>
Could you please explain more about how to achieve this or maybe there is a tutorial online? I searched the manual but maybe with inaccurate keywords, thus I didn't find any solution yet.I'm sorry I have very limited knowledge about the lime system.Advantage: You know that video 7 and video 2 were displayed and are able to show these thumbnails in the comparison question.
<script type="text/javascript" charset="utf-8"> function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex; // While there remain elements to shuffle... while (0 !== currentIndex) { // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; // And swap it with the current element. temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } $(document).on('ready pjax:scriptcomplete',function(){ // Fill the array var arr = [1,2,3,4,5,6,7,8]; arr = shuffle(arr); anumbers = arr.slice(0,4).join(''); $('#question{QID} input[type="text"]').val(anumbers); $('#question{QID}').hide(); }); </script>
src="https://www.youtube.com/embed/{Scene1}?rel=0"
<div style="float:left"><img src="https://www.myServer.de/myPath/thumb{substr(Q0,0,1)}.jpg" /></div> <div style="float:right"><img src="https://www.myServer.de/myPath/thumb{substr(Q0,1,1)}.jpg" /></div>
I found once we go back to the 'Declaration of consent' page which include the "Q0" for define the four displayed video, the 4 numbers will be recalculated thus the videos change.
<p class="MsoCommentText" style="margin-top: 0in; margin-right: 0in; margin-bottom: 8pt;"><strong><span style="font-size:20px;"></span><span style="font-size:20px;"><span style="font-family:Times New Roman,Times,serif;">And this is the question text</span></span></strong></p> <br />
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="600" src="https://www.youtube.com/embed/{Scene2}?rel=0&amp;autoplay=1" width="1100"></iframe>
{Scene2}?rel=0&autoplay=1" width="1100">
<script type="text/javascript" charset="utf-8"> function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex; // While there remain elements to shuffle... while (0 !== currentIndex) { // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; // And swap it with the current element. temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } $(document).on('ready pjax:scriptcomplete',function(){ // Fill the array var arr = [1,2,3,4,5,6,7,8]; arr = shuffle(arr); anumbers = arr.slice(0,4).join(''); $('#question{QID} input[type="text"]').val(anumbers); $('#question{QID}').hide(); }); </script>
QID input[type="text"]').val(anumbers); $('#questionQID').hide(); });