Image button with array type question (multiple rows issue...)

5 years 3 weeks ago #94199 by cnsla
cnsla created the topic: Image button with array type question (multiple rows issue...)
I'm trying to make the array type question with image buttons (replacing radio buttons-exactly, hiding and replacing them).
Like image below. My participants will be asked to choose one lego head, one arrow, one lemon, then click next.

I found the post dealing with similar problem.

and I successed with the code below with RADIO TYPE Question.

<a href="javascript:selectface(0);"><img class="face num0" src="" /></a> 
<a href="javascript:selectface(1);"><img class="face num1" src="" /></a> 
<a href="javascript:selectface(2);"><img class="face num2" src="" /></a>
<a href="javascript:selectface(3);"><img class="face num3" src="" /></a>
<a href="javascript:selectface(4);"><img class="face num4" src="" /></a>
<a href="javascript:selectface(5);"><img class="face num5" src="" /></a>
<a href="javascript:selectface(6);"><img class="face num6" src="" /></a>
<a href="javascript:selectface(7);"><img class="face num7" src="" /></a>
<a href="javascript:selectface(8);"><img class="face num8" src="" /></a>
<br />
<script type="text/javascript" charset="utf-8">
    function selectface(face) {
        $('#question1759'+face+')').attr('checked', true);
    $(document).ready(function() {
        $('#question1759 .survey-question-answer ').hide();
        $('#question1759 .questionhelp ').hide();
        selectface($('#question1759').val() - 1);
<style type="text/css">
.face {
border:4px solid white;
.selected {
border:4px solid #cc0000;

However, I have to make 3 rows, and cannot find the way to change the sourcecode....
I guess I should modify

$('#question1759'+face+')').attr('checked', true);

but, the code above is for radio type question and I have no idea to specify one row in array type question with the line.

Please, somebody help me : )

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!