I am going to make a calculator in Gravity Forms, but I dont know if its possible to do what I want.
It should be possible for people to calculate a price on a lawn.
So I have 1 input field to square meters and then I have 3 other fields with add ons to lawn.
But the prices in the 4 other fields, depents on how many square meters the customer types in the field for square meters.
So if the customer types in between 1-25 square meters, then field 1 cost = 2 USD field 2 cost = 6 USD field 3 cost = 7 USD
But if the customer then types in from 26-40, then field 1,2,3 should cost another price.
It that possible, does anybody no that.
Thank 🙂
2
Answers
I will give you the idea on how to do this via Javascript. Am assuming that Gravity Form fields accepts
id
attributes. Let theid
attribute of each fields bein_square
,field_1
,field_2
, andfield_3
So the fields might look like this:
Using Javascript, you could try something like this:
Here’s the fiddle: https://jsfiddle.net/xpy58b49/
You can use the wp_enqueue_script() to inject this Javascript file.
The Gravity Forms Conditional Pricing perk makes this super straightforward to setup. Here’s an rough example of how this might be configured: