🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 29, 2026

Dynamic Field Labels in Gravity Forms: One Form for Every Audience

GravityExtra
Dynamic Field Labels in Gravity Forms: One Form for Every Audience

If you build Gravity Forms for more than one audience, you have probably duplicated a form just to change a few labels. A clinic wants the same intake form to say “Doctor” on a referrer link and “Patient” on a patient link; a membership site wants to greet signed-in members by name; a reseller portal wants the same order form to show the partner tier. The Gravity Forms Dynamic Labels Premium Add-on removes the duplication: it sets a field’s label at render from a source you choose, so one form adapts to each visitor.

The problem with duplicating forms

Every duplicate of a form is a maintenance cost. Change a question, add a field, fix a notification, and you have to do it again in every copy — and the copies drift apart over time. Worse, the copies share nothing: entries land in different forms, reporting splits, and conditional logic has to be rebuilt in each one. The only reason the copies exist is a handful of labels. Dynamic Labels lets those labels vary on a single form, so there is one form to maintain, one place for entries, and one set of logic.

The Dynamic Label settings group in the Gravity Forms field editor
Turn on Dynamic Label on any field and write a template with a {source} placeholder.

How it works

On any field, open the Advanced tab and switch on Dynamic Label. You choose a source and write a template — a short piece of text with a {source} placeholder, such as Hello {source}, please confirm your details. At render time the add-on hooks Gravity Forms’ own gform_pre_render, resolves the source for that request, substitutes it into the template, escapes the result, and shows it. The field’s stored type and admin label are never changed, so everything downstream — reports, exports, merge tags, conditional logic — keeps working against the real field. Nothing is written to the database when the form renders.

Four sources for a label

The first source is a URL query parameter. A link such as /intake/?role=Doctor can set a label to read “Doctor”, which is ideal for campaign links, QR codes and portal buttons. The second is the current logged-in user: the visitor’s display name, their role, or any user-meta key, so a form can greet a member by name or adapt to their plan. The third is another field in the same form, so a later label can echo an earlier answer. The fourth is a field pulled from another form — its label or its default value, read locally through the Gravity Forms API, never an entry — which keeps a shared piece of wording in one place.

The source picker showing URL parameter, current user, another field, and a field from another form
Pick a source: an allow-listed URL parameter, the current user, another field, or another form’s field.

Security is built in, not bolted on

A label that can come from a URL is powerful, and in the wrong hands it would be a classic injection vector. Dynamic Labels is designed around that risk. First, a URL parameter is fail-closed: it is only ever used when you have explicitly added its key to the field’s allow-list. A parameter that is not on the list is ignored and the field shows its static label, so a visitor cannot invent a parameter that your form will trust. Second, you can restrict a parameter to a list of permitted values, so only the exact words you expect are accepted. Third, and most importantly, every value that reaches a label is escaped on output. If someone crafts a link that puts a <script> tag into a parameter, the add-on renders it as inert text; it is never written to the page as live markup, so it cannot run. These three rules — allow-list the key, optionally allow-list the value, always escape the output — are what make a render-time label from an untrusted link safe.

The allow-list and permitted-values fields for a URL-parameter source
A URL parameter is used only when its key is allow-listed; any other parameter is ignored and escaped.

Choices, sections and HTML text

The same engine templates more than the main label. Turn on choice templating and each option’s text becomes a template, so a drop-down can read Basic {source} and Premium {source} for the visitor’s tier. Turn on Section and HTML templating and the text of those fields is personalised too, which is the easiest way to add a tailored intro line to a form without a shortcode or a snippet. Every one of these is escaped on output exactly like the main label, so the security model is uniform across the whole form.

Nothing is duplicated, nothing is destroyed

Because Dynamic Labels only changes what is shown, there is no risk to your data. The stored field type and admin label are exactly what you configured; your entries are never read or written; and if you deactivate the add-on, your forms fall back to their static labels with nothing lost. It is a presentation layer over your existing fields, not a rewrite of them.

A rendered Gravity Form where a field label reads Hello Doctor
The visitor sees the resolved, escaped label; the stored field is unchanged.

A worked example: one intake form, two audiences

Imagine a clinic with a single intake form. The marketing team sends two links: patients get /intake/?who=Patient and referring clinicians get /intake/?who=Clinician. On the first field you turn on Dynamic Label, choose the URL-parameter source, set the parameter key to who, add who to the allow-list, and list the permitted values Patient and Clinician. You write the template Welcome, {source}. Now the patient link renders “Welcome, Patient” and the clinician link renders “Welcome, Clinician” — from the same form, the same entries table and the same notifications. If a curious visitor edits the link to ?who=<script>, two things protect you: the value is not on the permitted-values list, so it is ignored and the static label shows; and even if you had not set a value list, the output escaping would render the tag as plain text. One form, two audiences, and no new attack surface.

Templates and the {source} placeholder

A template is just the text you want to show, with {source} wherever the resolved value should appear. You can put it in the middle of a sentence (Your {source} benefits), at the start ({source}, please confirm below), or on its own so the label becomes exactly the resolved value. If a template has no placeholder, the value is appended, so even a bare label still reflects the source. Because the template is authored by you and only the resolved value is untrusted, the add-on can escape the whole result safely: your wording is preserved and the injected value is neutralised. This is a deliberately small, predictable rule — one placeholder, always escaped — so there are no surprises about what a visitor can and cannot influence.

Performance and compatibility

Dynamic Labels does its work only when a form is being rendered, on the gform_pre_render filter, and only for the fields you marked dynamic. There is no front-end script to load for the substitution, no database write on render, and no outbound request except licensing and updates to gravityextra.com. The cross-form source reads another form’s definition through the Gravity Forms API and caches nothing of your entries, because it never touches them. It works on Gravity Forms 2.9 and newer and on PHP 7.4 and newer, and because it only changes what is shown, it coexists cleanly with other add-ons that read the real field type and admin label.

Frequently asked questions

Can a visitor inject code through a link? No. A URL parameter is used only when you allow-list its key, you can also restrict it to specific values, and every value is escaped on output, so an injected script is shown as text and never runs.

Does it change my stored field or my entries? No. Only the label shown at render changes; the stored field type and admin label, and all your entries, are untouched, so reports and exports are unaffected.

What happens when I deactivate it? Your forms simply show their static labels again. Nothing is lost, because the dynamic value was only ever presentation.

Does it need an external service? No. It is self-contained, with no account and no API keys; the only network calls are licensing and updates to gravityextra.com.

Who it is for

Agencies that maintain one form for several client audiences; clinics and professional services that share a form between patients and referrers; membership and course sites that greet signed-in users by name; reseller and partner portals that show tier-specific wording; and anyone who has ever copied a form just to change a label. If that is you, Dynamic Labels collapses the copies back into one.

Get started

Install the add-on, activate your license key, and turn on Dynamic Label on your first field. You can see the full details, the security model and the pricing on the Gravity Forms Dynamic Labels Premium Add-on page. One form, every audience — safely.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr