| CARVIEW |
Select Language
HTTP/2 301
date: Tue, 30 Dec 2025 00:26:37 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_price_change/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=2bRu%2BXOa3hC1e0WYcDos3apH69Woa7jQgcDcH3dO8ATeltZ2vDY7Re4Y1tF0JBXvs%2BnB0vaYvQZjLUCmV9C1xc9%2Bg7gTtbLE5OPvznwnoGFDi9Hl"}]}
cf-ray: 9b5d6817889d8a2a-BLR
HTTP/2 200
date: Tue, 30 Dec 2025 00:26:38 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: MISS
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=6eG0LXeZPSMMynBRj3euYdjVOXaCyqZWVkXXzlPWY2UYRmbWokZzGcyANRT4T2PMoHcE7fSvSAwqqkNTd81etWlewcjVb0O9Rh6ZUS2E%2B536tBPt"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b5d681e0bd18a2a-BLR
gform_price_change - Gravity Forms Documentation
gform_price_change
Description
JavaScript action hook that is triggered when any pricing field is modified.
Note: This event was replaced by the gform-products-product_field_changed event in Gravity Forms 2.9.1.
Usage
document.addEventListener('gform_price_change', function(event) {
var productIds = event.detail.productIds;
var htmlInput = event.detail.htmlInput;
// Do something with productIds and htmlInput
console.log(productIds);
});
Parameters
- event Event Object
Default JS event object. - productIds object
The form id and the id of the product field. - htmlInput string
The HTML input field.
Example
Detecting Product Price Change
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('gform_price_change', function(event) {
var productIds = event.detail.productIds;
var htmlInput = event.detail.htmlInput;
console.log('Price changed for product field IDs:', productIds);
// Example: Check if the price change is for Product Field ID 1
if (productIds.indexOf(1) !== -1) {
alert('The price for Product 1 has been updated!');
}
});
});
Placement
Reference the article Adding JavaScript Code to the Frontend of Your Site.
Since
This filter was added in Gravity Forms version 1.7.
Source Code
This filter is located in gformInitPriceFields() in js/gravityforms.js.