Welcome, Guest
Username: Password: Remember me

TOPIC: textbox in array

textbox in array 3 months 3 weeks 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)


columns.png
The administrator has disabled public write access.

textbox in array 3 months 3 weeks ago #110579

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
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: 3 months 3 weeks ago by tpartner.
The administrator has disabled public write access.

textbox in array 3 months 3 weeks 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.141 seconds
Donation Image