Home › Forums › Quform WordPress › Calculations in 2 different forms
- This topic has 13 replies, 2 voices, and was last updated 4 years ago by zittis.
- AuthorPosts
- May 22, 2020 at 12:37 pm #31248zittisParticipant
I have followed the instructions in this link (https://support.themecatcher.net/quform-wordpress-v2/guides/advanced/calculations) for one of my forms to do some calculations. The calculations work perfectly.
I have created a second form where i want to add another calculation.
Will the calculations in the second form affect those in the first form? Do I have to do anything else in the code?
I am attaching the 2 calculations files.
Thank you in advance.
Attachments:
You must be logged in to view attached files.May 26, 2020 at 8:30 am #31275zittisParticipantHave you manage to have a look at this issue?
May 26, 2020 at 10:02 am #31279AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 26, 2020 at 3:39 pm #31293zittisParticipantPls help
I added this in the html
<div id=”form-total2″></div>Then added this code but still it doesnt work:
jQuery(function ($) {
var calculate = function () {
var total = 0;// Week 1
if ($(‘.quform-field-6_255_1’).is(‘:checked’)) {
total += 100;
}
// Week 2
if ($(‘.quform-field-6_255_2’).is(‘:checked’)) {
total += 100;
}
// Week 3
if ($(‘.quform-field-6_255_3’).is(‘:checked’)) {
total += 100;
}
// Week 4
if ($(‘.quform-field-6_255_4’).is(‘:checked’)) {
total += 100;
}
// Week 5
if ($(‘.quform-field-6_255_5’).is(‘:checked’)) {
total += 100;
}// Display the result to the user
$(‘#form-total2’).text(‘€’ + total);// Set the value of the hidden field
$(‘.quform-field-6_196’).val(” + total);
};// Calculate on page load
calculate();// Recalculate when these checkboxes or radio buttons are clicked
$(‘.quform-field-6_255_1, .quform-field-6_255_2, .quform-field-6_255_3, .quform-field-6_255_4, .quform-field-6_255_5).click(calculate);});
May 27, 2020 at 10:12 am #31297AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 29, 2020 at 10:00 am #31350zittisParticipantThanks again very much Ally.
One more thing please. How can I disable on of the checkboxes options. I don’t want to delete it, just disable it so that the user won’t be able to select it.
Thanks again.
June 1, 2020 at 11:19 am #31384AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 3, 2020 at 11:20 am #31431zittisParticipantThank you very much. Your support rocks!
July 27, 2020 at 7:55 am #31703zittisParticipantIs there a way to disable an option from a select menu (dropdown list)?
I can do that using radio buttons and check boxes.
July 27, 2020 at 11:15 am #31710AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
July 28, 2020 at 11:08 am #31711zittisParticipantThank you very much
November 18, 2020 at 12:54 pm #32240zittisParticipantHere comes Form number 3 with calculations. I have made 2 other forms already that have calculations. The form is here: https://www.gcsc.ac.cy/secondary/examinations-selection-2021/
But I always get a zero in my calculation.
I am attaching the code I added in Custom JavaScript.
Can you pls help me?
Thank you.
Attachments:
You must be logged in to view attached files.November 19, 2020 at 11:20 am #32248AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This reply was modified 4 years ago by Ally.
November 19, 2020 at 11:28 am #32250zittisParticipantThanks man. You are really great!
- AuthorPosts
- You must be logged in to reply to this topic.