textbox in array

More
3 years 3 months ago #110574 by barbacot
barbacot created the topic: textbox in array
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:
<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:

Please Log in to join the conversation.

More
3 years 3 months ago - 3 years 3 months ago #110579 by tpartner
tpartner replied the 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


.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 3 years 3 months ago by tpartner.

Please Log in to join the conversation.

More
3 years 3 months ago #110591 by barbacot
barbacot replied the 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!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now