- Posts: 6
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<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>
$(document).ready(function() { if($('#question9825').length > 0) { // Identify the questions var q1 = $('#question9825'); 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%' }); } });