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

How to Add a Rich Text (WYSIWYG) Field to Gravity Forms

GravityExtra
How to Add a Rich Text (WYSIWYG) Field to Gravity Forms

Ask a visitor to describe a problem, paste a job advert or write a short bio in a plain Gravity Forms paragraph field and you get a grey wall of text. No headings, no bullet points, no link they can click — just one long run of words that is hard to write and harder to read later. The fix is to give them a real editor: the same formatting toolbar WordPress uses for posts, right there on the form. That is exactly what the Gravity Forms Rich Text Field Premium Add-on does, and this guide explains how it works, how to set it up and how it keeps what people type safe.

What a rich text field is, and why a form usually does not have one

A rich text field, also called a WYSIWYG field — what you see is what you get — is a small text editor with buttons for bold, italic, lists, headings and links. Instead of storing a flat string, it stores formatted HTML, so a bulleted list stays a bulleted list and a link stays a link all the way through to the entry and your e-mail.

Gravity Forms ships a single-line text field and a paragraph text area, and both are plain on purpose. Accepting HTML from the public is risky: if a form stored whatever markup a visitor typed and then showed it on an admin screen, someone could slip a script into your dashboard. So the safe default is no formatting at all. A rich text field has to do two things at once — let people format their text, and refuse anything dangerous — and that is the work this add-on takes on.

Where a Rich Text field earns its place

Not every form needs one, but when the answer is more than a sentence, formatting changes everything:

  • A support or contact form where people explain a problem in steps, with a link to the page where it happens.
  • A “post a job” or directory submission where the description needs headings and a list of requirements.
  • A speaker, author or team bio that reads better with a little emphasis and a link.
  • Internal forms — case notes, handovers, meeting notes — where a quick list saves the next person time.

Step 1: add the field to your form

After you install and activate the add-on and enter your license key, open a form in the editor. Under Advanced Fields you will see a new button, Rich Text. Drag it onto the form and give it a label. On the live form the visitor now sees an editor with a formatting toolbar instead of a plain box.

A Rich Text field on a live Gravity Forms form: a WYSIWYG editor with a formatting toolbar where the visitor types
The visitor gets a real editor, with the buttons you allow.

Step 2: choose how much formatting to allow

The toolbar setting decides how many buttons the visitor sees. More is not always better: a short message is easier with three buttons than with twelve. There are three levels.

Basic gives bold, italic, bulleted and numbered lists and a link. Standard adds underline, a block quote, a heading, text alignment and a clear-formatting button, and is the right default for most forms. Full adds a paragraph-style drop-down with headings and preformatted text, strikethrough, a horizontal line and paste-as-plain-text, for long content such as an article or a job description. You set a default for new fields on the add-on settings page, and change any individual field in the form editor.

The toolbar only decides which buttons appear. No matter which level you pick, the same strict cleaning runs on the result, so a larger toolbar simply permits a few more tags, never anything unsafe.

Step 3: set required, a placeholder and a length

A Rich Text field has the settings you already know. Mark it required and an editor that contains only spaces, an empty paragraph or a lone line break still counts as empty, so no one slips past the check with a blank box. Add a placeholder to show a hint in the empty editor. Set a minimum and maximum length if you need one — and here is the useful part: the count is on the visible text, not the HTML. A two-line note dressed in a lot of markup is not rejected for being too long, and a visitor cannot pad a minimum with empty tags.

How the add-on keeps the HTML safe

This is the heart of a rich text field, so it is worth being clear about. When the form is submitted, the typed HTML is cleaned against an allow-list that matches the toolbar level. Only known tags survive. Paragraphs, bold, italic, underline, lists, links, headings, quotes and the rest of the allowed set are kept. Any other tag is unwrapped, so its text remains but the tag disappears.

Script and style blocks, iframes, forms and embeds are deleted together with their contents — there is no path through them. Event attributes such as onclick are removed, as are inline styles other than simple text alignment, and class or data attributes. Links are inspected one by one: a javascript: address is thrown away, only genuine web, mail and telephone links are kept, and any link that opens in a new tab is given a safe rel so the new page cannot reach back into yours.

For belt and braces the value is cleaned a second time, with the standard WordPress wp_kses_post function, and the cleaning runs again every time the value is shown. The rules live in a small, self-contained part of the add-on covered by automated tests, so the behaviour is verified on every build rather than taken on trust.

The formatted text where you need it

On the entry screen the value shows as formatted HTML in a neat box, so you read a visitor’s note the way they wrote it instead of squinting at raw tags. The entries list shows a short plain-text excerpt so the table stays tidy.

A Gravity Forms entry screen showing a Rich Text value rendered as formatted HTML: headings, a bulleted list and a link
The entry: the note shown with its headings, list and link intact.

The field has a merge tag, so you can place its value in a notification. In an HTML e-mail the formatting comes through; in a plain-text e-mail, a CSV export, or when you add the text modifier, the markup is stripped and you get clean plain text. The add-on chooses the right version for each context, so you never have to.

No more losing what was typed

One old annoyance with rich editors on forms is that a validation error anywhere on the page throws away everything the visitor typed in the editor. The add-on fixes this. When a submission fails, the Rich Text field comes back exactly as it was, so the visitor fixes the one field that was wrong and sends again, instead of writing their message a second time.

It works on a phone, and it works with the keyboard

A rich text field is only useful if everyone can use it, so the editor behaves the way people expect on whatever device they are holding. On a phone or a tablet the toolbar wraps to the width of the screen and the editor grows as the text does, so there is no tiny box to fight with and no horizontal scrolling. The common shortcuts work too — the usual key combinations for bold and italic, and the normal tab order — so someone filling in the form with a keyboard or assistive technology is not forced to reach for a mouse. Because the field is built on the editor WordPress already ships, it inherits years of that work rather than reinventing it.

It is also careful not to slow your pages down. The editor only loads on a page that actually contains a Rich Text field, so a site with one such form does not pay for it everywhere else, and a form made entirely of ordinary fields stays exactly as light as it was before you installed the add-on.

What happens when a license lapses

It is worth knowing how the add-on behaves if a license is not renewed, because a form breaking is the last thing anyone wants. Your forms keep working. Every existing Rich Text field still appears, still saves what people type and still runs the same server-side cleaning, so nothing that depends on security is ever switched off. The only change is that the editor falls back to a plain box and you cannot add a brand-new Rich Text field until the license is active again. Entries you already collected are untouched and keep their formatting.

Conditional logic and developers

The field supports Gravity Forms conditional logic, so you can show a “Details” editor only when it is relevant and leave it empty when it is hidden. If you build on the add-on, three helper functions are available: one to clean a piece of HTML on the allow-list, one to read the cleaned value of an entry field, and one to count the visible characters the length rule uses. Everything is your own server, with no outside call and no account.

Get started

A plain text box asks people to write without tools and then hands you their words with all the structure flattened out. A Rich Text field gives them headings, lists and links, keeps what they type safe, and shows it properly wherever it lands. For the full settings and the developer reference, see the Rich Text Field setup guide, and when you are ready, get the Gravity Forms Rich Text Field Premium Add-on and add a proper editor to your next form.

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