Welcome to the LimeSurvey Community Forum

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

Answer questions by keypress

  • FreshLemonUser
  • FreshLemonUser's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 6 months ago #142372 by FreshLemonUser
Answer questions by keypress was created by FreshLemonUser
Hi,
I just wondering if this is possible, Can you fill a multiple choice question by keypress (i.e. radio button questions, multiple choice questions, array questions, etc).

Reason being...I have a couple of multiple choice questions and a couple of radio buttons questions but each o one has a least 15 o 20 options "multiple choice".

Is this possible? I have looked at manual.limesurvey.org/Workarounds:_Manip...ime_using_Javascript :

<script type="text/javascript">

jQuery(document).ready(function() {

jQuery(document).bind('keypress', function(e){

if (48 <= e.which && e.which <= 57) {

jQuery('input:radio').each(function() {

var v = jQuery(this).val();

var c = (e.which <u> 48) ? 10 : e.which - 48;

if(v </u> 'Y' || v <u> 'N') {

v = (v </u> 'Y') ? 1 : 2;

}

if(v == c) {

jQuery(this).click();

jQuery('#limesurvey input:submit').click();

}

});

}

})

});

</script>

and can't seem to get it to work - does anyone have any sample surveys they could share with the correct syntax or point me in the right direction.

Thanks
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose