- Posts: 14332
- Thank you received: 4365
Ask the community, share ideas, and connect with other LimeSurvey users!
You used the correct snippet to insert into "custom.js"?I added your snippet for list-radio questions
$(document).on('ready pjax:scriptcomplete',function(){ $('.list-radio input[type="radio"]').on('click', function() { $('#ls-button-submit').trigger('click'); }); });
No. We cannot see what you are doing, unless we see at least your lss export.Any idea what I might be doing wrong?
/****************** User custom JS --------------- Put JS-functions for your template here. If possible use a closure, or add them to the general Template Object "Template" */ $(document).on('ready pjax:scriptcomplete',function(){ /** * Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute * @see https://learn.jquery.com/using-jquery-core/document-ready/ */ $('.list-radio input[type="radio"]').on('click', function() { $('#ls-button-submit').trigger('click'); }); });
I have to add that I am not using the 'radio' but the 'button group'
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ $('#question{QID} :radio').on('change', function(e) { $('#ls-button-submit').trigger('click'); }); }); </script>