- Posts: 17
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Wouldn't this make it basically the short text question type?!I need to limit to 1 row the answer' box of the long type questions.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ var thisQuestion = $('#question{QID}'); // Hide the textarea $('.answer-item textarea', thisQuestion).hide(); // Insert short text input $('.answer-item', thisQuestion).append('<input class="form-control inserted-input" type="text">'); $('.inserted-input', thisQuestion).val($('.answer-item textarea:eq(0)', thisQuestion).val()); // Listener on inserted input $('.inserted-input', thisQuestion).on('keyup change', function(i) { $('.answer-item textarea', thisQuestion).val($(this).val()).trigger('change'); }); }); </script>
Sometimes : best is to deactivate your survey temporary …AnnaSSSA wrote: Great, thanks!
With a script I can transform the long text question in a Yes/No question?