You will need to change the text field from an <input /> to a <textarea />.
If you want it for specific questions:
- Create a custom question theme as described here -
manualv4.limesurvey.org/Question_themes
.
- Edit
/upload/themes/question/yourQuestionThemeName/survey/questions/answer/listradio/rows/answer_row_other.twig.
If you want it for all list-radios you can override the core view in your survey theme:
- Extend your theme and copy
/application/views/survey/questions/answer/listradio/ into
/upload/themes/survey/customSurveyThemeName/views/survey/questions/answer/.
- Edit
/upload/themes/survey/yourSurveyThemeName/views/survey/questions/answer/listradio/rows/answer_row_other.twig.
In either case, you want something like this in
answer_row_other.twig:
Code:
{% set otherValue = answer_other|replace({'value="': ''})|trim('"', 'right')|trim %}
<!-- answer_row_other -->
<li id='javatbd{{ myfname }}' class='answer-item radio-text-item form-inline' role='group' {{ sDisplayStyle }} >
<!-- Checkbox + label -->
<div class="form-group othertext-label-checkox-container radio-item">
<input
type="radio"
value="-oth-"
name="{{ name }}"
id="SOTH{{ name }}"
{{ checkedState }}
/>
<label for="SOTH{{ name }}" class="control-label label-radio" id="label-id-{{ name }}">{{ othertext }}</label>
</div>
<!-- comment -->
<div class="form-group text-item other-text-item">
<textarea
class="form-control {{ kpclass }}"
name="{{ name }}other"
id="answer{{ name }}othertext"
title="{{ gT('Other') }}"
aria-labelledby="label-id-{{ name }}"
>{{ otherValue }}</textarea>
</div>
<script>
$("#answer{{ name }}othertext").on("keyup",function(){
if($.trim($(this).val())!=''){ $('#SOTH{{ name }}').click(); };
});
</script>
</li>
<!-- end of answer_row_other -->