Home › Forums › Quform WordPress › Some issue while calculating values via Quform
- This topic has 4 replies, 2 voices, and was last updated 1 year, 11 months ago by Ally.
- AuthorPosts
- November 30, 2022 at 12:11 pm #34983CremaParticipant
Hi
I am using a script for some calculations from text input fields
But I found in some cases one of the field values is not added properly
I add comments on the line of code whose value is not calculating
This code run perfectly fine majority of time but some time it misses a value
Please let me know how I can resolve this issue.jQuery(function ($) {
// For Factor calculation
var calculate = function () {
var total = -100;// Some time, This field value is not calculating
// A text input field with numeric value
var heightF= $(‘.quform-field-10_3’).val();
if (heightF && heightF.length && $.isNumeric(heightF)) {
total += parseFloat(heightF);
}// A text input field with numeric value
var weightF= $(‘.quform-field-10_39’).val();
if (weightF && weightF.length && $.isNumeric(weightF)) {
total -= parseFloat(weightF);
}// Display the result to the user (optional)
//$(‘#form-total’).text(‘Total: $’ + total);// Set the value of the hidden field (optional)
$(‘.quform-field-10_120’).val(total).triggerHandler(‘change’);
};// Calculate on page load
calculate();
// Recalculate when these text input fields are changed$(‘.quform-field-10_3’).on(‘keyup blur’, calculate);
$(‘.quform-field-10_39’).on(‘keyup blur’, calculate);December 1, 2022 at 10:17 am #34984AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 1, 2022 at 4:43 pm #34985CremaParticipantHi Ally I send you the site URL and explained the issue privately into the feedback form
December 3, 2022 at 5:38 pm #35001CremaParticipantHi Ally
I am still waiting for your response. This issue is occurring very frequently Now, and affecting my auto-responder campaigns.
I hope I will get a positive response from your endDecember 6, 2022 at 10:12 am #35008AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.