Gravity Forms has plenty of filters to customize your forms. We wrote very short articles in the past about filters we use a lot and decided to bring them all to this page for reference.
Capitalize fields in Gravity Forms
How to capitalize the content of a Gravity Forms input field? There are two possible angles. If you just want to display the content of a field in Uppercase, use the CSS. If you want to convert the user input to Uppercase while submitting the form, use the PHP solution.
Capitalize a form field with CSS for visual purpose
First you need the form ID and the field ID. Then add the following code to your CSS. Of course you need to change the Form and Field ID number. The correct CSS selector is ‘#input_FormID_FieldID’.
#input_6_1 { /*based on FormID and FieldID*/
text-transform: uppercase;
}
Capitalize a form field with PHP before entry
First you need the form ID and the field ID. Then add the following code to your functions.php. Of course you need to change the Form and Field ID number.
//Change _6 to the form ID number everywhere
add_action('gform_pre_submission_6', 'capitalize_fields_6');
function capitalize_fields_6($form){
// add all the field IDs you want to capitalize, to this array
$fields_to_cap = array('input_6_1');
foreach ($fields_to_cap as $each) {
// for each field, convert the submitted value to uppercase and assign back to the POST variable
// the rgpost function strips slashes
$_POST[$each] = strtoupper(rgpost($each));
}
// return the form, even though we did not modify it
return $form;
}
Change expiration date Save and continue Gravity Forms
Do you want to change the expiration date for Gravity Forms ‘Save and continue’ functionality (standard 30 days)? This is easily done by adding filter in the functions.php file in your theme folder.
How to change the expiration date in Gravity Forms Save and continue?
Just add the code below to the functions.php file in your theme folder. By changing the $expiration_days value you can set the number of days the form will be saved.
add_filter( 'gform_incomplete_submissions_expiration_days', 'gwp_days', 1, 10 );
function gwp_days( $expiration_days ) {
// change this value
$expiration_days = 365;
return $expiration_days;
}
Zip-code before City in Gravity Forms (order of address field)
Do you want to change the order of the Gravity Forms Address field items? Especially to put the ZIP-code before the City (as is usual in Germany and the Netherlands for example)? Here you find the easiest way.
How to change the ZIP-code field location in your Gravity Form
Copy this code in your functions.php in your theme directory and the zip-code will show before the City instead of after it.
add_filter( 'gform_address_display_format', 'address_format' );
function address_format( $format ) {
return 'zip_before_city';
}
Go to the top after Next or Submit Gravity Forms
When you use pages in your Gravity Forms (people click Next to go to the next page in the form) or when people submit their form, you may want to automatically have the page centred at the top of your website. This is very easy to do. It makes it much friendlier for visitors of your form, because they know that they start from the same point after clicking a button (Next or Submit).
How to create a top anchor in a multi page Gravity Form
Add the following code to your functions.php theme file. After people click Next or Submit, the page will be automatically outlined at the top of the page.
add_filter("gform_confirmation_anchor", create_function("","return 0;"));
WordPress Multi Site Gravity Forms License
If you use Gravity Forms in a Multi Site install of WordPress, and you create new sites,
you may want to add the Gravity Forms license key automatically to your new site.
How to automatically add Gravity Forms License key (and more) to multi-site installs
This is an easy way to prepopulate your Gravity Forms license key when new sites are created on a multi-site install. Add the following code to the wp-config.php file. More interesting multi-site automation options are described in de Gravity Forms documentation.
define("GF_LICENSE_KEY", "YOUR-LICENSE-KEY-HERE");
Our Premium add-ons for Gravity Forms
Advanced Merge Tags
This Gravity Forms Add-On adds extra Merge Tag modifiers (and a lot of power). From the most common used functions like capitalize and length to changing date formats.
JWT Prefill
Fill forms with data you can trust. Prefill Gravity Forms fields with a secure token instead of links with editable url parameters, so your data is accurate, tamper-proof, and ready to use.
Update Multiple Entries
Trigger the update of multiple entries in a target form by submitting an entry in a trigger form.
Advanced Number Field
Functionality for Number Fields, like rounding or only absolute numbers, fixed point notation, range calculation, custom units like % or m2 & show as slider.
Read tutorials about
n8n vs Zapier: Which Automation Tool Actually Fits Your Work?
Trying to decide between n8n vs Zapier? This article breaks down pricing, hosting, integrations, AI features, and where self-hosted n8n on a cheap VPS can beat Zapier’s task-based plans. You’ll also see how Gravity Forms users can plug in the GravityWP n8n Connector and move key workflows off Zapier without rebuilding their forms.
Cloudflare Tunnel + n8n: Expose Local n8n for Webhook Testing (Dev Only)
This guide shows how to use Cloudflare Tunnel Quick Tunnels to put a local n8n instance on the internet for real webhook testing. It’s a dev-only recipe that lets tools like GravityWP’s n8n Connector call your local n8n over HTTPS, without renting a VPS or opening ports.
Self-Host n8n with Docker on a VPS
Learn how to self-host n8n with Docker on a VPS using a production-ready setup. This step-by-step guide walks you through configuring Docker Compose, Postgres, HTTPS, and WEBHOOK_URL so you can run reliable, secure n8n workflows on your own server.
One-Click n8n Hosting: How to Deploy n8n with Railway, Elestio & Coolify
Learn how one-click n8n hosting works on platforms like Railway, Elestio, and Coolify. This guide explains when to pick one-click hosting over n8n Cloud or a raw VPS, how templates are structured, and which env vars, security settings, and troubleshooting tips you can’t skip.