- Posts: 16
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
textbox in array
- barbacot
- Topic Author
- Offline
- New Member
Less
More
9 years 9 months ago #110574
by barbacot
textbox in array was created by barbacot
I must create an array question where the first column is with text inputs and the rest of the columns are radio buttons.
I used the code from here as an inspiration and arrived at this:
The problem is that the text input column is the last one (probably because of td:last-child) buyt i don't know how to move it in the first position (see screenshot)
I used the code from here as an inspiration and arrived at this:
Code:
<script> $(document).ready(function(){ $('#question{QID} tbody tr td:last-child').each(function(){ var textinputid=$(this).find('input:radio').attr('id'); $(this).find('input:radio').hide(); $(this).append("<input type='text' data-copy='"+textinputid+"' />"); }); }); </script>
The problem is that the text input column is the last one (probably because of td:last-child) buyt i don't know how to move it in the first position (see screenshot)
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10104
- Thank you received: 3593
9 years 9 months ago - 9 years 9 months ago #110579
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic textbox in array
I'm not sure what those text inputs will do for you.
Have a look at this post - www.limesurvey.org/en/forum/design-issue...to-text-input#102550
.
Have a look at this post - www.limesurvey.org/en/forum/design-issue...to-text-input#102550
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 9 months ago by tpartner.
The topic has been locked.
- barbacot
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
9 years 9 months ago #110591
by barbacot
Thanks A LOT for the link - it was exactly what i needed!
Replied by barbacot on topic textbox in array
tpartner wrote: I'm not sure what those text inputs will do for you.
Have a look at this post - www.limesurvey.org/en/forum/design-issue...to-text-input#102550
.
Thanks A LOT for the link - it was exactly what i needed!
The topic has been locked.