# Pass a value to a Total field

**URL:** <https://community.gravityforms.com/t/pass-a-value-to-a-total-field/12260>\
**Category:** Get Help\
**Tags:** javascript, total-field\
**Created:** [March 24, 2022, 8:01pm UTC](https://community.gravityforms.com/t/pass-a-value-to-a-total-field/12260 "2022-03-24T20:01:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user6023cdfdd14c6534](https://avatars.discourse-cdn.com/v4/letter/u/dbc845/32.png) [@user6023cdfdd14c6534](https://community.gravityforms.com/u/user6023cdfdd14c6534)\
**Post date:** [March 24, 2022, 8:01pm UTC](https://community.gravityforms.com/t/pass-a-value-to-a-total-field/12260/1 "2022-03-24T20:01:27Z")

</div>

Hello, I have bought a plugin for credit card payment, but it only works with the Total field.

My form is somewhat more complex because it performs some calculations beforehand and I cannot use products.

How can I assign a number that I have previously calculated in the Total field of type price?

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [March 25, 2022, 9:07am UTC](https://community.gravityforms.com/t/pass-a-value-to-a-total-field/12260/2 "2022-03-25T09:07:59Z")

</div>

Payment add-ons don’t actually use the total field, that field is just display only. They actually calculate the total themselves using the values of the other pricing fields they find.

You’ll need to add a product field; it does have a calculation option so you can calculate the price based on the values entered into or choices selected in earlier fields.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [April 24, 2022, 9:08am UTC](https://community.gravityforms.com/t/pass-a-value-to-a-total-field/12260/3 "2022-04-24T09:08:45Z")

</div>

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