| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 12:43:35 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_currency_pre_save_entry/
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=OgLiHNnul7%2B8aKqbp8rDfli5AkATMIGFcm8kE9%2FXYixeq25NG0LwSHgsT4lBvLJdVpvIh0yL17m8IYLC5HJI65GbSWi3YcdQXwxdlsO8jxwUz%2FkP"}]}
cf-ray: 9b48e7836c7bc143-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 12:43:36 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: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=4SscQluKzDfpvM0NkxfCr5hX2kv5fxhuqit%2FPo4EstMs9DJwEMM1mHDqcEjsX7rOvXVMdZRSdGtuV1h9F07xMC0TXMU3QktkFtGckakwIKRGEmQj"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b48e78a9ed2c143-BLR
gform_currency_pre_save_entry - Gravity Forms Documentation
gform_currency_pre_save_entry
Description
This filter can be used to override the default currency code before the entry is saved.
Usage
The base filter which would run for all forms would be used like so:
add_filter( 'gform_currency_pre_save_entry', 'your_function_name', 10, 2 );
To target a specific form append the form id to the hook name. (format: gform_currency_pre_save_entry_FORMID)
add_filter( 'gform_currency_pre_save_entry_5', 'your_function_name', 10, 2 );
Parameters
- $currency string
The three character ISO currency code to be stored in the entry. Default is value returned by GFCommon::get_currency()
-
$form Form Object
The form currently being processed.
Example
This example shows how you can override the currency code with a value from a form field.
add_filter( 'gform_currency_pre_save_entry', 'override_currency_code', 10, 2 );
function override_currency_code( $currency, $form ) {
return rgpost( 'input_7' );
}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
gf_apply_filters( 'gform_currency_pre_save_entry', $form['id'], GFCommon::get_currency(), $form )
This filter is located in GFFormsModel::create_lead and GFFormsModel::save_lead in forms_model.php.
Since
This filter was added in Gravity Forms 1.9.13.26.