Well, the latest build of 2.05 was LimeSurvey 2.05+ build 141229 (nearly four and a half year ago)
You should really consider an update. Not only for security reasons.
In the meantime the template system changed twice. Many features were added, which the script relies on.
It's a simple question of type "array(text)".
Here is the code of the included javascript, which IMHO is easy to understand.
Maybe you are able to adapt. I am not.
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
var thisQuestion = $('#question{QID}');
// Insert selects
$('.answer-item.answer_cell_X003', thisQuestion).addClass('with-select').append('<select class="inserted-select form-control list-question-select">\
<option value="">Please choose...</option>\
<option value="1">male</option>\
<option value="2">female</option>\
<option value="3">other</option>\
<option value="4">DK/NA</option>\
</select>');
$('.answer-item.answer_cell_X004', thisQuestion).addClass('with-select').append('<select class="inserted-select form-control list-question-select">\
<option value="">Please choose...</option>\
<option value="1">Employed full time</option>\
<option value="2">Employed part time</option>\
<option value="3">3</option>\
<option value="4">4</option>\
<option value="5">5</option>\
</select>');
// Listeners
$('.inserted-select', thisQuestion).on('change', function(i) {
if($(this).val() != '') {
$(this).closest('.answer-item').find('input:text').val($.trim($('option:selected', this).text())).trigger('change');
}
else {
$(this).closest('.answer-item').find('input:text').val('').trigger('change');
}
});
// Returning to page
$('.with-select input:text', thisQuestion).each(function(i) {
var thisCell = $(this).closest('.answer-item');
var inputText = $.trim($(this).val());
var selectval = $('select.inserted-select option', thisCell).filter(function () { return $(this).html() == inputText; }).val();
$('select.inserted-select', thisCell).val(selectval);
});
// Clean-up styles
$('select.inserted-select', thisQuestion).css({
'max-width': '100%'
});
$('.with-select input:text', thisQuestion).css({
'position': 'absolute',
'left': '-9999em'
});
});
</script>
Joffm
There is a plugin "arrayTextAdapt"
extensions.sondages.pro/questions-updati...ging/arraytextadapt/
The newest version is in the LimeStore.
The development started in 2016. So maybe there is a version for LS2.05