- Posts: 6
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ //Identify this question var thisQuestion = $('#question{QID}'); $('li.answer-item', thisQuestion).each(function(i) { ansCode=($(this).attr('id').split('X{QID}')[1]); if(ansCode.substring(0, 2)=='SA') { $(this).css({ 'margin-left': '2.5em' }); } }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
dependantCheckboxes( {QID}, ['SQ1', 'SQ2', 'SQ3', 'SQ4'], // First-level sub-question codes ['SQ11', 'SQ12', 'SQ21', 'SQ22', 'SQ31', 'SQ32', 'SQ33', 'SQ41', 'SQ42', 'SQ43'], // Second-level sub-question codes ['SQ111', 'SQ112', 'SQ113', 'SQ321', 'SQ322', 'SQ323', 'SQ411', 'SQ412'] // Third-level sub-question codes );
var thisQuestion = $('#question{QID}'); var level1=; var level2=; var level3=; $('li.answer-item', thisQuestion).each(function(i) { ansCode=($(this).attr('id').split('X{QID}')[1]); if(ansCode.substring(0, 2)=='SA') { level2.push(ansCode); } else if(ansCode.substring(0, 2)=='SB') { level3.push(ansCode); } else { level1.push(ansCode); } }); dependantCheckboxes( {QID}, level1, // First-level sub-question codes level2, // Second-level sub-question codes level3 // Third-level sub-question codes );
Please Log in to join the conversation.
Please Log in to join the conversation.