Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

move input field into table cell

  • BaranD
  • BaranD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177483 by BaranD
move input field into table cell was created by BaranD
Hello,

I am trying to move multipe short text in different cells in a table. Whenever I execute the code I see the question disappearing. In the bottom part of the code you can see the javascript code to try to move one short text field

Does anybody know what I should change in my code?


<table border="1" cellpadding="1" cellspacing="1" height="132" width="320">
<tbody>
<tr>
<td>Evv</td>
<td style="text-align: center;">T</td>
<td id="td1"> </td>
<td style="text-align: center;">-</td>
<td id="td2"> </td>
<td id="td3"> </td>
<td> V</td>
</tr>
<tr>
<td>Evr</td>
<td style="text-align: center;">T</td>
<td id="td3"> </td>
<td style="text-align: center;">-</td>
<td id="td4"> </td>
<td id="td5"> </td>
<td> V</td>
</tr>
<tr>
<td>El</td>
<td style="text-align: center;">T</td>
<td id="td6"> </td>
<td style="text-align: center;">-</td>
<td id="td7"> </td>
<td id="td8"> </td>
<td> V</td>
</tr>
<tr>
<td>Cvv</td>
<td style="text-align: center;">C</td>
<td id="td9"> </td>
<td style="text-align: center;">-</td>
<td id="td10"> </td>
<td id="td11"> </td>
<td> μ F</td>
</tr>
<tr>
<td>Cr</td>
<td style="text-align: center;">C</td>
<td id="td12"> </td>
<td style="text-align: center;">-</td>
<td id="td13"> </td>
<td id="td14"> </td>
<td> μ F</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {


//define which question elements to use for certain grid cells

var $item7b = $('#answer{SID}X{GID}X{QID}JSSQ001');



//move elements to proper cells
$('#question537 .td1').append($item7b);





});

</script>
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177485 by DenisChenu
Replied by DenisChenu on topic move input field into table cell
Send a lss with the question and javascript … we are not superman (maybe some but not me) and can‘t fix such code only seeing it …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • BaranD
  • BaranD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177487 by BaranD
Replied by BaranD on topic move input field into table cell
Haha! I will do that in the future. I was able to fix it myself.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose