Welcome, Guest
Username: Password: Remember me

TOPIC: textbox in array

textbox in array 1 year 1 month ago #110574

  • barbacot
  • barbacot's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
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)


This message has an attachment image.
Please log in or register to see it.

The administrator has disabled public write access.

textbox in array 1 year 1 month ago #110579

  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 5100
  • Thank you received: 1048
  • Karma: 440
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 1 year 1 month ago by tpartner.
The administrator has disabled public write access.

textbox in array 1 year 1 month ago #110591

  • barbacot
  • barbacot's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
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 administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.156 seconds