How to make one calculated field execute the code on change of a slider value?
-
Hello,
Is there a way to make one calculated field execute the code on change of a slider value?
The form is set to work on click of a calculate button, the issue is, I’m setting the slider value through code when a user selects a radio button. So now lets say a user wants to set a custom value by dragging the slider and when he clicks the calculate button again, the slider resets back to the value selected in the radio buttons which defeats the very purpose of having the slider. I know it would work when the form is set to eval dynamically but I just want one calculated field to execute the code on change of the slider value while the form is set to work on click of a calculate button. How can it be done?
Tried this code, but doesn’t seem to be working:
<script> jQuery(document).on('change', '.carb-slider select', function(){ var protein = (fieldname60/100)*fieldname85; var v = prec(protein/4,0); var color = '#666666', f = jQuery('#carb-result'); f.css('color',color).html(v+' g'); return v; }); </script>
Thanks.
- The topic ‘How to make one calculated field execute the code on change of a slider value?’ is closed to new replies.