Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Quform centering #25667
    blackbeard
    Participant

    Hello,

    Yes, I have checked Forms – Settings – Tweaks & Troubleshooting -> Server Compatibility section
    and found this error:

    Any suggestions how to fix it?
    Thanks!

    in reply to: Calculations with range slider #25547
    blackbeard
    Participant

    Managed to get it working!
    Here’s what my code looks like now: https://imgur.com/a/mPyoeIA

    • This reply was modified 7 years ago by blackbeard.
    • This reply was modified 7 years ago by blackbeard.
    • This reply was modified 7 years ago by blackbeard.
    in reply to: Calculations with range slider #25542
    blackbeard
    Participant

    My version, that doesn’t work :/ , the ID’s are on point.

    jQuery(document).ready(function($) { 
    
    	var doCalc = function() {
    		//get value of slider hidden fields
    		var creditVal = $('.quform-field-1_9').val();
    		var durationVal = $('.quform-field-1_4').val();
    		if (creditVal.length==0 || durationVal.length==0) return;
    		
    
    		creditVal = parseFloat(Number(creditVal,10).toFixed(2));
    		durationVal = parseFloat(Number(durationVal,10).toFixed(2));
    		if (isNaN(creditVal) || isNaN(durationVal)) return; 
    
    		var totalCost =  (creditVal * durationVal + creditVal * 0.1) / durationVal ;
    
    		$("div.total-cost").html("VISO: &EUR;" + totalCost);
    	}
    
    	$('.quform-field-1_8').on('change', doCalc); //credit amount slider
    	$('.quform-field-1_3').on('change', doCalc); //duration slider
    });
    
    • This reply was modified 7 years ago by blackbeard.
    in reply to: Calculations with range slider #25534
    blackbeard
    Participant

    Hi @katw,

    Yes I do capture the value of each slider in hidden fileds.

    The values are clean numbers.

    And yes I do want to show the calculation result live to the customer.

    Would gladly appreciate to see some kind of template code. 🙂

    • This reply was modified 7 years ago by blackbeard.
    in reply to: 2 questions regarding range slider #25520
    blackbeard
    Participant

    That worked great, thanks! 🙂 At first I thought something’s wrong, but then I realized I need to add additional noUiSlider URL link to my functions.php.

    Have a great day katw!

Viewing 5 posts - 1 through 5 (of 5 total)
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy