Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community EditionVersion 5.4.15+221212
Own server or LimeSurvey hosting: Own
Survey theme/template: Fruity
==================
I have found a script (Tony Partner) on the forum to insert a text field in the last column of an array type question. The script is working on my version but I need this text field in the first column. I am not sure how to adapt the script. I've tried changing '.answer-item:last-child' in the script to '.answer-item:first-child' but, due to my limited knowledge, it was a total disaster.
Currently the display is as follows:
The script used:<script type="text/javascript" data-author="Tony Partner">
$(document).on('ready pjax:scriptcomplete',function(){
// Identify the questions
var thisQID = {QID};
var thisQuestion = $('#question'+thisQID);
var textQuestion = thisQuestion.nextAll('.multiple-short-txt:eq(0)');
var textQID = textQuestion.attr('id').replace(/question/, '');
// Hide the text question
textQuestion.hide();
// Remove all radios from last column
$('.answer-item:last-child', thisQuestion).removeClass('radio-item').addClass('text-item');
$('.answer-item:last-child :radio', thisQuestion).remove();
// Move the text inputs
$('tr.answers-list', thisQuestion).
each
(function(i) {
var thisCode = $(this).attr('id').
split
('X'+thisQID)[1];
$('.answer-item:last-child', this).append($(':text[id$="X'+textQID+thisCode+'"]', textQuestion));
});
});
</script>