- Posts: 61
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
A vs B C vs D E vs F C vs F G vs H A vs H G vs D E vs B X vs Y S vs T U vs V Q vs R
Please Log in to join the conversation.
Please Log in to join the conversation.
If you do not tell us the exact requirements you cannot expect a solution that works for you.But my example was a little simplified
Please Log in to join the conversation.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/1.0.11/jquery.csv.min.js"></script> <script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:complete',function() { // Calculate the number of weeks since start date // Note: JavaScript counts months from 0 to 11 [b] // [/b]Here start day is 1st of september 2021 const startdate = new Date(2021, 8, 1); const aktdate = new Date(); var dd = Math.floor((aktdate - startdate)/(60*60*24*7*1000)); var url = "/upload/surveys/123456/files/items.csv"; var Items = new Array(); $.get(url,function(data){ fullArray = $.csv.toArrays(data); $(fullArray).each(function(i, item){ Items.push(item[0]); }); $("#question{QID} input[type=text]:eq(0)").val(Items[0+4*dd]); $("#question{QID} input[type=text]:eq(1)").val(Items[1+4*dd]); $("#question{QID} input[type=text]:eq(2)").val(Items[2+4*dd]); $("#question{QID} input[type=text]:eq(3)").val(Items[3+4*dd]); }); $('#question{QID}').hide(); }); </script>
Please Log in to join the conversation.
[b] // [/b]Here start day is 1st of september 2021
Please Log in to join the conversation.
Please Log in to join the conversation.
Of course, why not.Just one more question (also to me sometimes the requirements change) if it was necessary to use the radiobuttos rather than the check boxes ??
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.