- Posts: 2
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Try these:Any idea where i could find a GOOD start-up guide for learning JavaScript?
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ var qSlider = SS; var qHidden = HH; // Hide the hidden question $('#question'+qHidden).hide(); // Interrupt next/submit function $('form#limesurvey').submit(function(){ // Loop through the sliders $('#question'+qSlider+' .multinum-slider').each(function(i) { var index = i; if (index > 0) { index = index*2; } // Find the slider value var sliderMax = $('input[id^="slider-param-max"]', this).val(); var sliderVal = $('div[id^="slider-callout"]', this).text(); // Populate the appropriate hidden question input $('#question'+qHidden+' input.text:eq('+index+')').val(sliderVal); $('#question'+qHidden+' input.text:eq('+(index+1)+')').val(Number(sliderMax - sliderVal)); }); return true; }); }); </script>