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

How to Turn Long Gravity Forms into Accordions or Tabs (No Page Breaks)

Bong Huynh
How to Turn Long Gravity Forms into Accordions or Tabs (No Page Breaks)

Long forms lose people. A quote request, an application or an onboarding form with 30 fields looks like a wall of work, even when each part is short. Page breaks help, but every page is another click and another server round trip. A lighter way is to split the form on one page into collapsible sections: an accordion, or tabs.

This tutorial shows how to do that in Gravity Forms with Gravity Forms Accordion & Tabs: Collapsible Sections, using only the Section fields you already have.

The same Gravity Forms form shown as an accordion, top tabs and side tabs
One form, three layouts: accordion, top tabs, side tabs.

When to use an accordion, and when tabs

  • Accordion works best on long, linear forms: people see every section title and open one at a time. Allow several open sections if people often go back.
  • Top tabs suit forms with a few equal parts (for example Details, Vehicle, Coverage).
  • Side tabs suit wider layouts and forms with longer section titles.

On phones, tabs turn into an accordion below a breakpoint you choose, so nothing is squeezed.

Step 1: Add Section fields

In the Gravity Forms editor, add a Section field in front of each group of fields. The label becomes the header or tab title; the description becomes a short subtitle. In the field’s Appearance tab you can pick an icon and tick Start with this section open.

Step 2: Turn on Accordion & Tabs

Open the form’s Settings → Accordion & Tabs, tick Enabled, and choose a layout, a start state (first open, all closed, or all open for the accordion) and a style preset.

Accordion and Tabs form settings in Gravity Forms
Layout, start state, preset, colours, mobile breakpoint and behaviour options.

Step 3: Match your form theme

The Classic preset has a clean card look with a green accent. Card and Minimal take the primary colour and corner radius of the Gravity Forms Orbital theme, so the sections match your buttons. You can set your own accent colour and radius, and choose a light, dark or automatic colour scheme. Right-to-left languages are supported.

Step 4: Make errors easy to fix

The biggest risk with collapsed sections is a hidden error. After a failed submission the first section with an error opens and scrolls into view, every tab shows how many errors it holds, and the links in the Gravity Forms error summary open the right section. This works with AJAX and multi-page forms.

Gravity Forms tabs after a failed submission: the Your vehicle tab is open with 3 errors and Coverage shows 1
The tab with the first error opens; the counts show what is left.

Step 5: Optional extras

  • Remember the open section after a reload or an AJAX page change.
  • Deep links such as #form-12-your-vehicle open a section from a link (handy in emails and help pages).
  • Completion tick on sections whose required fields are filled.
  • Conditional logic: a section hidden by a rule hides its tab as well.
Gravity Forms tabs shown as an accordion on a phone
Below the breakpoint, tabs become an accordion.

Plan the sections before you build

A collapsible form is only as good as its section titles. Before you add anything, list the parts of the form the way a visitor thinks about them: for a car insurance quote that could be Your details, Your vehicle and Coverage. Keep each title short, because it becomes the label on a tab or accordion header, and use the Section field description as a one-line subtitle when a title needs a hint.

Fields placed above the first Section field stay visible all the time, which is a good home for a name and e-mail address that every visitor must fill in. Everything below a Section field, up to the next Section field, becomes the content of that section. On a multi-page form every page gets its own accordion or set of tabs, so you can combine page breaks and sections when a form is really long.

Dark mode, right-to-left and presets

The colour scheme can be Light, Dark or Auto, which follows the visitor’s system setting. The accent colour and corner radius can be changed per form, so the sections match the rest of your site without writing CSS. Layouts also work on right-to-left pages, where the side tabs sit on the right-hand side and the arrow keys follow the reading direction. Every option lives in one settings screen for the form, so a designer can set it up without touching the theme.

Several forms and conditional logic

You can put more than one form with Accordion & Tabs on the same page; each one works on its own. If a Section field is hidden by conditional logic, its tab is hidden too, and when that tab was the open one, the first visible tab opens instead. Nothing needs to be configured for this to work, so you can use conditional logic to show a section such as Company details only to visitors who need it.

Checklist before you publish

  1. Open the form on your site and click through every section or tab with the mouse.
  2. Submit the form empty to see which section opens first and how the error counts look.
  3. Resize the browser to a phone width to confirm that tabs become an accordion.
  4. Tab through the form with the keyboard only, and use the arrow keys on the tabs.
  5. If your theme or custom CSS targets the old 1.x markup, check that part of the form too.

Accessibility and speed

Tabs follow the WAI-ARIA tabs pattern: arrow keys move between tabs, Home and End jump to the ends, and focus is always visible. Accordion headers are real buttons inside the headings. Animations stop when the visitor asks for reduced motion. The markup is built on the server, so fields stay in the Gravity Forms grid and there is no flash of the flat form; the front-end script has no jQuery dependency and is about 2 KB gzipped.

Already using version 1.x?

Update as usual. Your forms keep their style, start state, licence and 1.x CSS class names, and nothing is written to the database on update. The old Style 1, 2 and 3 become Accordion, Top tabs and Side tabs with the Classic preset, which keeps the 1.x look.

One thing changes: with tabs and “Closed Tab By Default”, the tab bar is now shown with no tab open, where 1.x hid the whole field list. If a form needs the old behaviour for any reason, a per-form Use the 1.x renderer switch loads the unchanged 1.6.2 files for that form. It is a safety switch for one major version, not a setting to leave on for ever. Details are in the documentation.

Common questions

Do I need page breaks?

No. Sections split the form on one page. Page breaks still work, and each page gets its own accordion or tabs.

Does it need jQuery?

The add-on’s front-end script does not. Gravity Forms itself may still load jQuery for its own features.

Will my 1.x custom CSS still work?

The Classic preset keeps the 1.x look and class names. If something differs, the per-form 1.x renderer switch brings back the 1.6.2 behaviour.

Is it accessible?

It uses WAI-ARIA tabs and accordion markup with keyboard support and visible focus, and the add-on markup passed an axe-core check with no serious or critical issue in our tests.

Which versions are supported?

WordPress 5.8 or later, PHP 7.4 or later and Gravity Forms 2.5 or later. It was tested with Gravity Forms 2.9.8 and 3.1.2.

Get Gravity Forms Accordion & Tabs: Collapsible Sections

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