Build complex Gravity Forms shortcodes visually from the Form Settings panel — no shortcode syntax knowledge required.
- Core Form Display: Embed any form with title, description, AJAX, tab index, and field value pre-fill options
- Conditional Shortcodes: Generate AND/OR conditional logic blocks using actual field labels and plain-language descriptions (requires GF Advanced Conditional Shortcodes by Gravity Wiz)
- User Information: Output user details or arbitrary user meta with selectable formatting
- Login Form: Build login forms with custom labels, registration link, redirect URL, and more
- Split Test: Select multiple forms for A/B rotation — the shortcode serves a different form to each visitor
- Entry Count: Display total, unread, starred, spam, or trashed entry counts with number formatting
- Entries Left: Show remaining submissions before a form reaches its limit — ideal for urgency messaging
- Progress Meter: Visual progress toward a goal with payment and field-value tracking (requires GF Progress Meter by Gravity Wiz)
- Tabbed layout inside Form Settings → Shortcode Builder keeps each shortcode type separate and scannable
- Drag-and-drop tab reordering — arrange tabs in the order that fits your workflow
- Per-user tab visibility toggles — disable unused tabs to declutter the interface
- Notification Editor Modal: A dedicated toolbar button next to "Add Media" opens the builder inside the Gravity Forms notification editor and inserts the generated shortcode directly into TinyMCE or the plain textarea
- Visual Builder: Point-and-click shortcode generation — no syntax memorisation needed
- Multilingual: Works with content in any language
- Translation-Ready: All strings are internationalized; French (fr_FR) included
- Secure: Nonce-verified AJAX handlers with specific capability checks and input sanitization
- GitHub Updates: Automatic updates from GitHub releases via the standard WordPress update screen
- Gravity Forms (any recent version)
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Optional: GF Advanced Conditional Shortcodes (Gravity Wiz) — required for AND/OR conditions in the Conditions tab
- Optional: GF Progress Meter (Gravity Wiz) — required for the Progress Meter tab
- Upload the
gravity-forms-shortcode-builderfolder to/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
- Open any form in Gravity Forms and go to Settings → Shortcode Builder
- Select a tab, configure your options, and copy the generated shortcode
Inside any Gravity Form, go to Settings → Shortcode Builder. A separate modal is also available inside the notification editor via the Shortcode Builder toolbar button next to "Add Media".
Only the most relevant tabs for notification content: Conditional, User Information, Entry Count, and Entries Left. Disabled tabs are excluded from the modal as well.
Yes. Use the visibility toggles at the top of the Shortcode Builder page. Preferences are saved per user and persist across sessions.
No. The Conditional and Progress Meter tabs are hidden automatically when their respective Gravity Wiz dependencies are not active.
The builder generates standard Gravity Forms shortcodes — you can edit the copied shortcode freely after generation. No custom shortcode tags are introduced.
.
├── gf-shortcode-builder.php # Bootstrap, plugin header, autoloader
├── uninstall.php # Cleanup on plugin deletion
├── README.md
├── assets/
│ ├── css/
│ │ ├── admin-builder.css # Styles for the builder interface
│ │ └── admin-modal.css # Styles for the notification modal
│ └── js/
│ ├── admin-builder.js # Drag-and-drop and tab UI logic
│ └── admin-modal.js # Modal open/close and shortcode insertion
├── includes/
│ ├── class-github-updater.php # GitHub auto-updates via WP update screen
│ ├── Plugin.php # Main plugin class (singleton)
│ └── Tabs/ # Individual tab logic classes
│ ├── CoreFormDisplay.php
│ ├── Conditional.php
│ ├── UserInfo.php
│ ├── Login.php
│ ├── SplitTest.php
│ ├── EntryCount.php
│ ├── EntriesLeft.php
│ └── ProgressMeter.php
├── views/
│ └── tabs/ # HTML templates for each tab
│ ├── core-form-display.php
│ ├── conditional.php
│ ├── user-info.php
│ ├── login.php
│ ├── split-test.php
│ ├── entry-count.php
│ ├── entries-left.php
│ └── progress-meter.php
└── languages/
├── gf-shortcode-builder-fr_FR.mo # French translation (binary)
├── gf-shortcode-builder-fr_FR.po # French translation (source)
└── gf-shortcode-builder.pot # Translation template
- New: Composite field support in the Conditional Shortcodes tab — Address, Name, Checkbox, Time, and Date subfields are now listed individually inside grouped optgroups, with hidden subfields automatically excluded
- Fixed: PHP 7.4 fatal error caused by
str_ends_with()(PHP 8.0+) in the GitHub auto-updater - Fixed: Duplicate plugin folder collision (
-mainsuffix from GitHub zips) could cause a fatalrequire_oncefailure — constants now guarded and updater loaded via__DIR__ - Fixed: Missing
wp_unslash()in AJAX handlers (save_tab_order,ajax_get_tab_content,save_tab_visibility) and unsanitizedenabled/form_idinputs - Fixed:
array_filter()result stored withoutarray_values(), producing sparse arrays in user meta - Fixed: Uncaught exception during tab rendering could leave an open output buffer; now wrapped in
try/catch - Fixed: Direct
$_GETaccess in the notification modal method — replaced with\rgget() - Fixed: Missing
esc_attr()ondata-tab-enabledattribute output - Fixed:
__()called withself::TEXT_DOMAINconstant, preventing string extraction bywp i18n make-pot - Improved: Autoloader uses
require_onceinstead ofrequire - Improved: Removed unused
use GFCommonimport from Conditional tab class - Improved: Removed debug
console.log()calls from production JS - Improved: GitHub token retrieval now uses
constant()to avoid IDE false positives
- Changed: Major codebase restructuring — adopted
GFSBnamespace for all classes - Improved: Separated PHP logic (
includes/) from HTML views (views/) for better maintainability - Improved: Enhanced AJAX security with specific capability checks and input validation
- Improved: Implemented custom PSR-4 autoloader for class loading
- New: Plugin logo
- Improved: Refactored all inline CSS and JavaScript to external asset files for browser caching and maintainability
- New: Per-tab visibility toggles at the top of the Shortcode Builder page
- Improved: Tab visibility preferences saved per user and persist across sessions
- New: Modal experience inside the Gravity Forms notification editor with dedicated toolbar button and direct shortcode insertion
- Improved: Notification modal restricted to the most relevant tabs for a streamlined workflow
- Improved: Conditional placeholders describe conditions in plain language with AND/OR context
- Improved: Enhanced localization coverage for modal labels, state messages, and placeholders
- Initial release
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.
Made with love for the WordPress community
Easily build and manage complex Gravity Forms shortcodes via a user-friendly interface in the Form Settings panel. Each shortcode type is available as an accordions, ideal for sites using conditional display, entry stats, split tests, login forms, and more. Compatible with Gravity Wiz Advanced Conditional Shortcodes and Gravity Wiz Progress Meter, where available.
- Tabbed Builder Interface: Each shortcode category is in its own tab for clarity. Reorder tabs as you see fit.
- Notification Editor Modal: Launch the builder right from the Gravity Forms notification editor (next to “Add Media”) and insert shortcodes straight into TinyMCE or the plain textarea.
- Core Form Display: Build standard Gravity Forms embed shortcodes with title, description, AJAX, tab index, and field value options.
- Conditional Shortcodes: Generate conditional logic shortcodes for dynamic content, supporting AND/OR groups (with GF Advanced Conditional Shortcodes by Gravity Wiz).
- Plain-Language Conditional Placeholders: The generated conditional shortcode now describes each condition in human-readable text, using actual field labels, operators, and values.
- User Information: Output user details or user meta by key, with selectable output formatting.
- Login Form: Create login forms with options for custom text, registration links, redirect, and more.
- Split Test: Select multiple forms for built-in A/B testing; the shortcode will rotate which form is shown to each visitor.
- Entry Count: Display the total, unread, starred, spam, or trashed entries for any form, with customizable number formatting.
- Entries Left: Show the remaining entries before a form reaches its submission limit, great for limited offers and urgency.
- Progress Meter: (Optional, requires GF Progress Meter by Gravity Wiz) Visual meter showing progress toward a goal, supporting advanced tracking (payments, field values, etc.).
gravity-forms-shortcode-builder/
├── gf-shortcode-builder.php <-- Main plugin file, autoloader, and bootstrap
├── assets/ <-- CSS and JS assets
│ ├── css/
│ │ ├── admin-builder.css <-- Styles for the builder interface
│ │ └── admin-modal.css <-- Styles for the notification modal
│ └── js/
│ ├── admin-builder.js <-- Logic for drag-and-drop and UI interactions
│ └── admin-modal.js <-- Logic for the modal and shortcode insertion
├── includes/ <-- PHP classes (logic)
│ ├── Plugin.php <-- Main plugin class (Singleton)
│ └── Tabs/ <-- Individual tab classes
│ ├── CoreFormDisplay.php <-- Logic for Core Form Display tab
│ ├── Conditional.php <-- Logic for Conditional tab
│ ├── UserInfo.php <-- Logic for User Info tab
│ ├── Login.php <-- Logic for Login tab
│ ├── SplitTest.php <-- Logic for Split Test tab
│ ├── EntryCount.php <-- Logic for Entry Count tab
│ ├── EntriesLeft.php <-- Logic for Entries Left tab
│ └── ProgressMeter.php <-- Logic for Progress Meter tab
├── views/ <-- HTML templates (presentation)
│ └── tabs/ <-- View files for each tab
│ ├── core-form-display.php <-- Template for Core Form Display
│ ├── conditional.php <-- Template for Conditional
│ ├── user-info.php <-- Template for User Info
│ ├── login.php <-- Template for Login
│ ├── split-test.php <-- Template for Split Test
│ ├── entry-count.php <-- Template for Entry Count
│ ├── entries-left.php <-- Template for Entries Left
│ └── progress-meter.php <-- Template for Progress Meter
├── languages/ <-- Translation files
└── README.md <-- Plugin documentation
- WordPress 5.8+ recommended
- Gravity Forms (any recent version)
- Optional Free Plugin: GF Advanced Conditional Shortcodes (by Gravity Wiz) for AND/OR/regex in Conditions tab
- Optional Free Plugin: GF Progress Meter (by Gravity Wiz) for Progress Meter functionality
- Download and unzip this repository.
- Place the entire folder in your site’s
/wp-content/plugins/directory. - Activate Gravity Forms Shortcode Builder in the WordPress Plugins menu.
- Go to any Gravity Form’s Settings > Shortcode Builder.
- Click any tab and fill out the options for your desired shortcode type.
- From the notification editor, use the Shortcode Builder button next to “Add Media” to open the modal, generate your shortcode, and click Insert Shortcode to paste it automatically.
- Copy the auto-generated shortcode and insert it where needed in confirmations, posts, pages, block patterns, etc.
- New: Composite field support in the Conditional Shortcodes tab — Address, Name, Checkbox, Time, and Date subfields now listed individually inside grouped optgroups, with hidden subfields excluded
- Fixed: PHP 7.4 fatal error —
str_ends_with()(PHP 8.0+) replaced with a PHP 7.4-safe check in the GitHub updater - Fixed: Duplicate plugin folder collision (
-mainsuffix) causing fatalrequire_oncefailure — constants guarded and updater loaded via__DIR__ - Fixed: Missing
wp_unslash()in AJAX handlers and unsanitized POST inputs - Fixed: Sparse array stored in user meta after
array_filter()withoutarray_values() - Fixed: Uncaught render exception could leave open output buffer
- Fixed: Direct
$_GETaccess replaced with\rgget()in notification modal - Fixed: Missing
esc_attr()on data attribute output - Fixed:
__()called with constant instead of string literal text domain - Improved: Autoloader, unused imports, debug logs, and GitHub token handling cleaned up
- Refactoring: Major codebase restructuring for better maintainability and security.
- Namespaces: Adopted
GFSBnamespace for all classes. - Separation of Concerns: Separated PHP logic (
includes/) from HTML views (views/). - Security: Enhanced AJAX security with specific capability checks and input validation.
- Autoloader: Implemented a custom autoloader for better class loading performance.
- Added a logo
- Refactored all inline CSS and JavaScript to external asset files for improved maintainability, browser caching, and code organization.
- Added per-tab visibility toggles at the top of the Shortcode Builder page. Disable any tab to hide it from the builder and the notification modal dropdown.
- Tab visibility preferences are saved per user and persist across sessions.
- Added a modal experience inside the Gravity Forms notification editor with a dedicated toolbar button and direct shortcode insertion.
- Restricted notification modal tabs to the most relevant shortcodes (Conditional, User Information, Entry Count, Entries Left) for a streamlined workflow.
- Improved conditional placeholders to spell out conditions in plain language (localized) and reflect AND/OR relations.
- Enhanced overall localization support, covering the modal button labels, state messages, and newly added placeholder text.
- Initial release.
This project is licensed under the GNU AGPL.
Feedback, issues, and PRs welcome!

