# Custom Field. How is a pricing field identified

**URL:** <https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471>\
**Category:** Get Help\
**Tags:** gform\_product\_field\_types\
**Created:** [July 29, 2021, 11:56am UTC](https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471 "2021-07-29T11:56:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lwoods](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/lwoods/32/3287_2.png) [@lwoods](https://community.gravityforms.com/u/lwoods)\
**Post date:** [July 29, 2021, 11:56am UTC](https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471/1 "2021-07-29T11:56:54Z")

</div>

I can’t find out how to identify a field as a pricing field so that the GF javascript will grab it for the Total field. I am doing a complex calculation for the price, and then need to fire the GF script to pass it to the Total field.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [July 29, 2021, 3:30pm UTC](https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471/2 "2021-07-29T15:30:56Z")

</div>

Hello @lwoods - all product type fields (products, options and shipping) are automatically added to the form total by the Gravity Forms scripts. Are you using different field types, or product fields?

---

<div class="post-metadata">

**Author:** ![lwoods](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/lwoods/32/3287_2.png) [@lwoods](https://community.gravityforms.com/u/lwoods)\
**Post date:** [July 29, 2021, 3:52pm UTC](https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471/3 "2021-07-29T15:52:21Z")

</div>

I have a multiple products, multiple quantities custom field where the total is calculated based upon product/quantity in various ways, depending on the selections. So, I end up with the final total myself. Now I need to get it “out of my field” and into the Total so that it can be used for payment through third-party payment gateways. I have found the “total” javascript ( gform\_product\_total) where technically I could do all of the calculations and feed the Total field the answer, BUT from my testing, unless there is at least one “pricing” field on the form, this javascript doesn’t fire. That’s why I need to be able to define a pricing field that will cause the gform\_product\_total javascript to fire.

---

<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:** [July 29, 2021, 5:10pm UTC](https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471/4 "2021-07-29T17:10:43Z")

</div>

Try using the gform\_product\_field\_types filter to register your field type as a pricing field:

> **[gform\_product\_field\_types](https://docs.gravityforms.com/gform_product_field_types/)**
>
> The gform\_product\_field\_types hook filters the input types to use when checking if a field is a product field, allowing support for custom product 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:** [September 27, 2021, 5:11pm UTC](https://community.gravityforms.com/t/custom-field-how-is-a-pricing-field-identified/10471/5 "2021-09-27T17:11:36Z")

</div>

Closed on September 27, 2021, 5:11pm UTC

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