• Resolved Filmguy2013

    (@filmguy2013)


    Hello. Is it possible to create a calculator with this plugin that allows a person to calculate the volume of water their swimming pool holds?

    I need to be able to create a calculator form that has 4 fields, in the first field (Field1) the user would insert the width of their pool in feet, in the second field (Field2) the user would insert the length of their pool in feet, in the third field (Field3), the user would insert the depth of the shallow end of their pool in feet and in the fourth field (Field4), the user would insert the depth of the deep end of their pool in feet. Then, when the user presses the “calculate” button, the calculator would multiply field1 * field2 * field3 * field4 AND THEN MULTIPLY THE TOTAL OF ALL FOUR FIELDS BY 7.5 (Field1 * Field2 * Field3 * Field4 * 7.5 = Total Gallons of Water Their Pool Holds) since there are 7.5 gallons of water in each cubic foot. The form would have to automatically multiply the user’s input by 7.5. There would be no input field for the 7.5.

    Can I create this calculator form with the free version of the plugin? If so, how do I do that?

    The link I provided is a pool water delivery website. On the bottom right of the homepage is a Pool Water Volume Calculator link. Click that and a calculator form will pop up to show you the exact form I need to create.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @filmguy2013

    Yes of course, you simply should to insert four number fields (the names of the fields are assigned dynamically, but I’ll assume they are: fieldname1, fieldname2, fieldname3 and fieldname4)

    and then, you simply should insert a calculated field, and enter the following equation through its “Set Equation” attribute:

    
    fieldname1*fieldname2*fieldname3*fieldname4*7.5
    

    And that’s all.
    Of course, using the correct names of the fields in your form.

    Best regards.

    Thread Starter Filmguy2013

    (@filmguy2013)

    Hello. Thank you for the quick reply. I did what you said to do, but the form is performing the equation like so, if I insert a 2 in each of the four fields which would be 2*2*2*2*7.5 the total comes to 120 when it should be 60 because the calculator is multiplying the total of the first two fields by field 3 and then multiplying that by 7.5. How do I set the calculator to multiply all four fields one by one and THEN multiply that total by 7.5 so that I would get 60 instead of 120 if I insert a 2 in each field?

    Also, is there a way to add a button and make the user click the button to see the total?

    Thanks.

    Plugin Author codepeople

    (@codepeople)

    Hello @filmguy2013

    In mathematics the order of factors does not alter the product. So, if you multiply first all four fields between them, and then, by 7.5 the result would be the same: 2*2*2*2 = 16 and 16*7.5 = 120, the issue is your formula definition.

    First, the volume of the figure would never be: field1*field2*field3*field4, it depends on the shape of figure.

    If you want the equations won’t be evaluated dynamically:

    – Untick the checkbox: “Eval dynamically the equations associated to the calculated fields”, in the “Form Settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png)

    – Insert a button field in the form, and select the “Calculate” option as the button’s type in its settings.

    Best regards.

    Thread Starter Filmguy2013

    (@filmguy2013)

    Hello. So, if I understand you correctly, I can’t make the form calculate the numbers so that 2*2*2*2*7.5 = 60? The form is always going to multiply by by consecutive order so that 2*2*2*2*7.5 = 120?

    I unchecked the “Eval dynamically the equations associated to the calculated fields” box and saved the settings and then tried again and the total still came out to 120 instead of 60.

    Plugin Author codepeople

    (@codepeople)

    Hello @filmguy2013

    I’m not talking about the plugin, it is not mathematically possible that this operation:

    2*2*2*2*7.5 returns 60

    Your formula for the volume is incorrect.

    – If the swimming pool is rectangular, with the same depth in every point, the volume would be: width*length*depth

    – If the slope of the swimming pool start in zero, until the maximum depth in the other end, the volume would be: width*length*depth/2

    So, the correct would be to use the average: width*length*(depth A+depth B)/2

    In whose case the equation associated to the calculated field would be:

    
    fieldname1*fieldname2*(fieldname3+fieldname4)/2*7.5
    

    You need to know the mathematics you want to calculate.

    Best regards.

    Thread Starter Filmguy2013

    (@filmguy2013)

    That worked! Sorry man, me went to the public schools. In all seriousness though, thank you so much for your help! I am now going to give your plugin a 5 star review.

    Thread Starter Filmguy2013

    (@filmguy2013)

    Just left a 5 star review. Thanks again!

    Plugin Author codepeople

    (@codepeople)

    Thank you very much.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Pool Water Volume Calculator?’ is closed to new replies.