Hi @shah8384
I hope you’re well today!
This can be achieved easily with just a single calculation field and a single “number” field (for floor quantity selection) like this:
– add a “number” type field to the form, set its “minimum” limit to your minimum number of floors and make sure that calculations option is enabled; let’s say it’s a “number-1” field;
– add a calculation field to the form and set its calculation formula to
({number-1}*50)+500
and that’s it. You can now use your calculation field as a payment amount value source in PayPal and/or Stripe field.
—–
An alternative way that uses more fields but may be a bit nicer in terms of breaking down costs and showing them to customers is to use more calculation fields. It would also let you edit prices easier in case you’d like to change them:
– add one calculation field for base price and set calculation formula to 500 (let’s say it’s calculation-1)
– ad another calculation field for “per floor” price and set calculation formula to 50 (let’s say it’s calculation-2)
– add a number field for number of floors (again set its limits and enable calculations), let’s say it’s number-1
– add another calculation field for “calculated total floors price” (let’s say it’s calculation-3) and set its calculation formula to
{number-1}*{calculation-2}
– add another calculation field for total price (let’s say it’s calculation-4) and set its formula to
{calculation-1}+{calculation-3}.
Again, you can now use that total price (calculation-4) as a source of payment value.
Since this example is a bit more complex, I’ve prepared example form for you (note that field IDs are different in it but the principle is the same) so you could import it to your site, test it and check fields settings to see exactly how it’s made.
You can find import code here for this example here:
https://pastebin.com/MnSpRjRH
Best regards,
Adam