How to use number filed as total field (gravitiy form + woocommerce)

Hi there,

I can’t find the answer to my issue.

I use gravity form to create a custom cushion configuration form.

I need to calculate with number fields the volume of the cushion and then calculate the cost price with those number fields.

I am looking for a way to use a number field to replace the Total field.

I’m not really good with PHP even if I’m able to understand it, but writing the code is still a bit complex for me.

Someone to help?

Hello. You can use all number fields in the form to gather the information you need about the dimensions of the cushion. Then you can add a single Product field configured as a Calculation. In that field, you will multiply all your dimensions together to arrive at a volume, and you can multiply by any other figures you need (like price per cubic unit or something like that.) Start with the number fields and then add a single product field.

Here is how to configure the product field as a calculation:

Here is how to use the calculations:

If you need help with the calculation on the product field, please let us know.

Hi Chris,

Thanks for reply. I’am all good with the solution you proposed.

Here is another issue I have :
I need to add in the calculation option fields.

Is here a concrete example :
(number field) Width : 20 / Depth : 20 / Height : 20
(number field) Total Volume (m3) = 0.008m3
(option field) Foam with value of 832€ per m3
(number field) volume x foam value = 0.008x832
(number field) total = 6.66€

But I have like 9 kind of foams with different prices as I have then 2 differents covers wich gives me multiple total fields. That’s why using options is a great deal for me so I don’t have multiple fields at the end.

But pricing total field at the end add options values.

So instead of having my total of 6.66 I have = 6.66+832 with is wrong in my case.

Hi Chris,
Any news about my last message ?

Hello Unir. Can you open a support ticket and include your form export?

https://www.gravityforms.com/open-support-ticket/technical/

If not, can you export the form and post the JSON somewhere, then share the link here? This is how to export a form: https://docs.gravityforms.com/exporting-a-form-from-gravity-forms/

Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.