Welcome to the LimeSurvey Community Forum

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

Default Answer in Dropdown-Array

More
6 years 6 months ago #160149 by achecchini
Replied by achecchini on topic Default Answer in Dropdown-Array
Tanks for the quickly response!

The workaround I'm using is to put this script in the question source:

<script type="text/javascript" charset="utf-8">

$(document).ready(function(){

// Identify this question ID
var qID = {QID};

// Loop through the rows and check the first radio if none are already checked
$('#question'+qID+' table.question tbody tr').each(function(i) {
if($('input.radio:checked', this).length == 0) {
$('input.radio:eq(0)', this).attr('checked', true);
}
});
});

</script>

unfortunately the version of Lime I am working on is 2.05, so i can't quickly change the template to use pure CSS with pseudo-elements instead of imagetick_lime_2.js

I'm using a customized template for use lime in a Smartphone survey. This is why I changed the default radiobutton and checkbox in graphic mode ....

Hope this help to shaping the problem ...

Thanks again!
A.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose