🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Rich Text Field Premium Add-on Setup Guide

Updated 8 min read Gravity Forms Fields & Inputs
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. Add a Rich Text field to a form
  5. Choose the toolbar
  6. Required, placeholder and length
  7. How the text is kept safe
  8. Formatted text in entries, notifications and merge tags
  9. Nothing lost on a validation error
  10. Conditional logic
  11. For developers
  12. A closer look at the three toolbars
  13. Exports, PDFs and reports
  14. Common questions
  15. In short

Video walkthrough

Gravity Forms Rich Text Field Setup Guide: WYSIWYG Editor with Bold, Lists and Links
Video setup guide: Gravity Forms Rich Text Field Watch on YouTube

The Gravity Forms Rich Text Field Premium Add-on adds a new field type to Gravity Forms: a Rich Text field. On the form the visitor sees a small WYSIWYG editor — the same editor WordPress uses for posts, built on wp_editor and TinyMCE — with buttons for bold, italic, lists, headings, links and more. What they type is stored as formatted HTML, cleaned on a strict allow-list, and shown safely in the entry, in your notifications and anywhere you use the merge tag.

It is made for the places a single-line text box or a plain paragraph is not enough: a message to a team, a bio, a job description, case notes, a product description, a support request where a bulleted list and a link make the difference. Everything runs on your own server. The add-on calls no outside service and needs no account.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer. The add-on is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.
  • An active license key for this add-on.

If Gravity Forms is missing or older than 2.9, the add-on shows a notice in the WordPress admin and does nothing else.

Install and activate

  1. Install and activate the add-on like any plugin, after Gravity Forms.
  2. Open Forms → Settings → Rich Text Field and enter your license key.
  3. On the same screen choose the default toolbar a new Rich Text field starts with. Each field can be changed afterwards.
The Rich Text Field settings page: license key and the default toolbar for new fields
The add-on settings: the license key and the default toolbar for new Rich Text fields.

Add a Rich Text field to a form

Open a form in the editor. In the field list, under Advanced Fields, you will find Rich Text. Drag it onto the form like any other field. Give it a label, and decide how it should behave in the settings on the right.

A Rich Text field on a live Gravity Forms form: a WYSIWYG editor with a formatting toolbar where the visitor types
What the visitor sees: a real WYSIWYG editor, not a plain text box.

Choose the toolbar

The Editor toolbar setting decides how many buttons the visitor sees. There are three levels, so you can match the field to the job and not overwhelm people with options they do not need:

  • Basic — bold, italic, bulleted and numbered lists, and a link. The right choice for a short message or a comment.
  • Standard — everything in Basic plus underline, a block quote, a heading, text alignment and a clear-formatting button. A good default for most forms.
  • Full — everything in Standard plus a paragraph-style drop-down (headings and preformatted text), strikethrough, a horizontal line and paste-as-plain-text. For long content such as a job description or an article.

Whatever the toolbar, the typed HTML is always cleaned on the same safe allow-list before it is stored. A bigger toolbar simply allows a few more tags.

Required, placeholder and length

  • Required works as you expect. An editor that holds only spaces, an empty paragraph or a single line break counts as empty, so a visitor cannot pass the check by clicking into the box and leaving it blank.
  • The placeholder is the faint hint shown in the empty editor.
  • The text length setting sets a minimum and a maximum. The count is on the visible text, not the markup, so a short note wrapped in a lot of formatting is not rejected for being long, and a visitor cannot reach a minimum with empty tags.

How the text is kept safe

Letting visitors send HTML is useful, but it has to be done carefully, or a form becomes a way to inject a script into your admin screens. This add-on never trusts what is typed. When the form is submitted, the HTML goes through an allow-list built from the toolbar level:

  • Only known tags survive. Paragraphs, bold, italic, lists, links, headings and the rest of the allowed set are kept; anything else is unwrapped so its text stays but the tag is gone.
  • Script and style blocks, iframes, forms and embeds are removed with their contents. There is no way to smuggle one through.
  • Event attributes such as onclick, inline styles other than text alignment, and class or data attributes are stripped.
  • Links are checked. A javascript: address is dropped; only real web, mail and telephone addresses stay, and a link that opens in a new tab is given a safe rel so the new page cannot reach back.

The same cleaning runs again, with the WordPress wp_kses_post function, as a second layer, and it runs every time the value is shown. The cleaning rules live in a small, self-contained part of the add-on that is covered by unit tests, so the behaviour is checked on every build.

Formatted text in entries, notifications and merge tags

On the entry screen the field shows its value as formatted HTML inside a tidy box, so you read it the way the visitor wrote it — headings, lists and all — and never as a wall of tags or raw markup. The entries list shows a short plain-text excerpt so the column stays readable.

A Gravity Forms entry screen showing a Rich Text value rendered as formatted HTML: headings, a bulleted list and a link
The entry screen: the typed note shown as the visitor formatted it, safely.

The field has a merge tag, like any Gravity Forms field. Drop it into an e-mail and the formatted text appears in the message. In an HTML notification you get the real formatting; in a plain-text notification, in a CSV export or when you add the :text modifier, you get clean plain text with the markup removed. You do not have to think about which is which — the add-on sends the right version for the context.

Nothing lost on a validation error

A long-standing frustration with rich editors on forms is that a validation error somewhere else on the page wipes out everything the visitor typed. This add-on restores the content: when a submission fails, the Rich Text field comes back filled in, exactly as it was, so the visitor only has to fix the one thing that was wrong and send again.

Conditional logic

The Rich Text field works with Gravity Forms conditional logic. You can show or hide it depending on another answer — a “Details” editor that only appears when someone picks “Other”, for example — and when the field is hidden, its value is left empty, just like any native field.

For developers

Three helper functions are available if you build on the add-on:

  • gfrichtext_sanitize( $html, $level ) cleans a piece of HTML on the add-on’s allow-list for a toolbar level and returns safe HTML.
  • gfrichtext_get_value( $entry_id, $field_id ) returns the cleaned value of a Rich Text field in an entry.
  • gfrichtext_text_length( $html ) returns the number of visible characters, the same count the length rule uses.

A closer look at the three toolbars

It helps to picture what each level actually offers, because the right choice keeps a form simple and still gives people enough.

The Basic toolbar is deliberately small. Bold and italic cover almost all everyday emphasis, a bulleted or numbered list turns three cramped sentences into three clear points, and a link lets someone point you to the exact page they mean. For a contact form, a comment box or a short message, this is usually all anyone wants, and the field looks friendly rather than busy.

The Standard toolbar is the sensible middle. On top of the basics it adds underline, a block quote for pulling out a customer’s words or a note, a heading so a longer answer can be broken into parts, left, centre and right alignment, and a button that clears formatting when a paste has brought in too much. Most forms that need formatting at all are happiest here.

The Full toolbar is for real documents. The paragraph-style drop-down lets a writer move between normal text, several heading levels and preformatted text in one place, and you also get strikethrough, a horizontal line to separate sections and a paste-as-plain-text button that strips a messy clipboard down to clean words. Use it for a job advert, an article submission or a long description, and keep it away from a one-line message where it would only be clutter.

Exports, PDFs and reports

Because the value is a normal Gravity Forms field value, it travels everywhere the platform already goes. In a CSV export the field gives clean plain text, so a spreadsheet stays readable and no stray tags leak into a cell. Add-ons that build a PDF or a report from an entry receive the formatted HTML and render it as headings and lists, exactly as the entry screen does. You do not have to treat a Rich Text field as a special case in your reporting; it behaves like the field it sits next to and simply carries formatting where formatting makes sense.

Common questions

Can a visitor paste formatted text from a document? Yes. Pasted content is cleaned on the same allow-list, so styles and stray markup from a word processor are removed and only the formatting your toolbar allows is kept.

Does it add a database table? No. The value is stored in the entry like any other field.

What happens if the license lapses? Your forms keep working. Existing Rich Text fields still show, still save and still get the same server-side cleaning; the editor simply falls back to a plain box, and you cannot add a new Rich Text field until the license is active again. Security is never gated.

Will the formatting look right in my theme? The stored HTML is plain, standard tags — paragraphs, headings, lists, links — so it takes your theme’s styles wherever it is shown.

In short

The Gravity Forms Rich Text Field Premium Add-on gives your visitors a real formatting editor, keeps what they type safe with an allow-list and a second cleaning pass, and shows it properly in the entry, your e-mails and your merge tags — with no outside service, no account and nothing new in the database.

Still need help?

Our support team answers tickets every day, usually within a few hours.

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