Welcome to the LimeSurvey Community Forum

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

Can I wrap array with radio buttons?

More
9 years 2 months ago - 9 years 1 month ago #116360 by cnsla
I hope to put explanations and different options line by line of the array.
Unfortunately, displaying by group and combining questions in wrapped page doesn't works, because too many groups will be there. (SQL error happens...)

So, I want to put radio buttons in tables, and link it to hidden 'real' radio buttons in array-type question.

It looks little easier than star-rating example, or use image as button, but I am keeping fail.
Is there any workaround to use radio and link it to 'real' radio button in subquestions (i.e. SQ001...SQ002...etc).


The function I used for using image button is like below.
Code:
    function selectval(valance) {
 
        $('.valance').removeClass('valanceselected');
        $('#question{[u]QID[/u]} #javatbd{[u]SGQ[/u]}SQ001 input.radio:eq('+valance+')').attr('checked', true);
        $('.numa'+valance).addClass('valanceselected');
    }

How can I apply this kind of variable (i.e. {QID} ) to radio input?
Code:
<td class="answer_cell_001 answer-item radio-item" style="margin: 0px; padding: 4px; border-collapse: separate; border-spacing: 2px;">
                  <input class="radio" id=[u]"answer614884X7X461VAL-1"[/u] name="VAL" style="margin: 0px; padding: 0px; vertical-align: middle;" title="Very Strong" type="radio" value="1" /></td>
Last edit: 9 years 1 month ago by cnsla.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #116383 by tpartner
Replied by tpartner on topic Can I wrap array with radio buttons?
I would move the actual LimeSurvey radio inputs into your table. Something like:

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).ready(function() {
    $('.my-table-cell-selector').append('#answer11111X22X33SQ1_A1');
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose