I want to create an array question with an "Other" option at the end. I found already several ways to do that with Javascript. Unfortunately, due to safety reasons I am not allowed to deactivate the XSS Filter. Is there any other way to use Javascript (eg. in the template) and if not, is there a way to create this question without using Java?
thanks for your answer. What would I use instead {QID}? My plan was to use one of your scripts which I found in the LS forum(shown below). Would that even work or am I completly on the wrong track?
Best Regards
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Identify the questions
var q1 = $('#question'+{QID}+'');
var q2 = $(q1).nextAll('.text-short:eq(0)');
// Hide the short-text question
$(q2).hide();
// Move the hidden text input into the array
$('th.answertext:last', q1).append($('input[type="text"]', q2));
// Some styling...
$('input[type="text"]', q1).css({
'width': '50%'
});
});
</script>