Drupal is a registered trademark of Dries Buytaert
Emulsify Tools 2.1.2 Minor update available for module emulsify_tools (2.1.2). AI (Artificial Intelligence) 1.5.0-alpha2 New alpha version released for module ai (1.5.0-alpha2). AI (Artificial Intelligence) 1.5.0-alpha1 First alpha version released for module ai (1.5.0-alpha1). Easy Encryption 1.0.4 Minor update available for module easy_encryption (1.0.4). Extra Paragraph Types (EPT): Micromodal 2.0.1 Minor update available for module ept_micromodal (2.0.1). Extra Paragraph Types (EPT): Timeline 2.0.1 Minor update available for module ept_timeline (2.0.1). Emulsify 7.1.1 Minor update available for theme emulsify (7.1.1). Varbase Project 11.0.5 Minor update available for module varbase_project (11.0.5). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs. Extra Paragraph Types (EPT): Images 2.0.0 Module ept_images updated after 10 months of inactivity (2.0.0).

This module provides a widget for entity reference fields that opens forms for adding or editing referenced entities in a modal dialog, avoiding the complexities and potential issues of nested forms. It allows users to manage referenced entities without leaving the current page.

Opens referenced entity forms in a Drupal modal dialog instead of embedding them inline. A stable, zero-dependency alternative to Inline Entity Form that avoids nested form state entirely.

Inline Entity Form Dialog provides an entity_reference field widget that lets editors add, edit, and reorder referenced entities without ever nesting one Drupal form inside another.

The problem with Inline Entity Form

Drupal's Form API was not designed for nested forms. IEF embeds a complete entity form — with its own form state, validation pipeline, submit handlers, and AJAX callbacks — inside an outer form being processed by the same pipeline. This causes a well-known class of problems: form state value bleed, cascading AJAX failures when the outer form rebuilds, submit handler ordering conflicts, and repeated breakage on minor core updates (IEF's core file alone exceeds 1,140 lines, most of which are workarounds for these issues).

How this module works

The parent form stores only a JSON array of entity IDs in a hidden input. "Add" and "Edit" buttons open the referenced entity's native form inside a ui-dialog modal — a completely separate page request with its own independent form state. After the dialog saves:

  1. A custom AJAX command (UpdateEntityReferenceCommand) is returned by the server.
  2. The JS handler appends the pre-rendered item row to the widget table and updates the hidden input.
  3. The dialog closes. The parent form is never rebuilt.

On parent form submission, massageFormValues() reads the hidden input and returns the standard ['target_id' => $id] array to Drupal's Field API — exactly as any other entity reference widget does.

Features

  • Add new referenced entities via a dialog (configurable form mode)
  • Edit existing referenced entities via a dialog
  • Remove references (client-side, entity not deleted)
  • Drag-and-drop reorder with Drupal.tableDrag
  • Autocomplete field to reference existing entities
  • Configurable dialog width and form mode per field instance
  • Cardinality enforcement (Add button hidden at limit)
  • Zero contrib dependencies
  • Drupal 11 — uses #[Hook] attribute system throughout

No dependency on Inline Entity Form

This module is a standalone replacement. It does not require, extend, or interact with the inline_entity_form module.

Post-Installation

Once the module is enabled, no global configuration page is required.

  1. Navigate to Structure → Content types (or any entity type) → Manage form display for the entity type that has an entity_reference field.
  2. Locate the entity reference field in the widget list and change its widget to Inline Entity Form Dialog.
  3. Click the gear icon (⚙) on the widget row to configure per-field options: form mode, dialog width, and whether Add/Edit buttons are shown.
  4. Save the form display.

The widget is now active. Editors will see an item list with Add, Edit, Remove, and drag-reorder controls when editing content. No additional configuration is needed beyond the widget settings described above.

Additional Requirements

No additional requirements beyond Drupal core. The module depends only on:

  • drupal:system — core
  • drupal:field — core
  • drupal:core ^11.2 — for #[Hook] attribute support and
    drupal.dialog.ajax

No contributed modules, external libraries, or third-party APIs are required. The module intentionally carries zero contrib dependencies.

Recommended modules/libraries

None required, but these modules complement this widget in common setups:

  • Gin Admin Theme — The widget's structural CSS defers to the active admin theme. Gin provides a clean, modern admin UI that pairs well with the dialog-based workflow.
  • Entity Reference Revisions — If your referenced entities need revision tracking (e.g. Paragraphs-style content), pair this widget with the Entity Reference Revisions field type.
  • Inline Entity Form — The module this project replaces. If you have existing content using IEF widgets, migrate the form display to Inline Entity Form Dialog — no data migration is required as both widgets operate on standard entity_reference fields.

Similar projects

  • Inline Entity Form — The established approach to inline entity editing. Embeds the referenced entity's form directly inside the parent form. Powerful but architecturally fragile: nested form state, cascading AJAX failures, and frequent breakage on core updates are well-documented issues. Inline Entity Form Dialog is a direct, drop-in replacement that avoids these problems entirely.
  • Entity Browser — A highly configurable widget for selecting existing entities through a browser modal (media library, view-based browser, autocomplete, etc.). Focused on selection rather than creation. Complementary to this module: use Entity Browser when editors need to browse and pick existing content; use Inline Entity Form Dialog when editors need to create and edit referenced entities on the fly.
  • Paragraphs — A content composition module that uses IEF internally for its own widget. Inline Entity Form Dialog does not replace the Paragraphs widget but provides a cleaner alternative for standard entity_reference fields outside the Paragraphs ecosystem.

Supporting this Module

The best way to support this module is to:

  • Report bugs and suggest features in the issue queue.
  • Submit patches or merge requests for open issues.
  • Write and share use-case documentation or blog posts.
  • Give the project a star ★ on the project page.

Community Documentation

  • README — The module's README.md covers installation, configuration, all widget settings, how the dialog-save cycle works, and a troubleshooting guide.
  • Why not IEF? — The README includes a detailed technical explanation of the nested form state problems that motivated this module, useful background for architects evaluating the tradeoffs.

Community blog posts, video walkthroughs, and demo sites will be linked here as they are published. If you have written about this module, please post in the issue queue and it will be added.

Activity

Total releases
6
First release
Jun 2026
Latest release
6 days ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.5 Stable Jul 14, 2026
1.0.4 Stable Jun 10, 2026
1.0.3 Stable Jun 8, 2026
1.0.2 Stable Jun 8, 2026
1.0.1 Stable Jun 6, 2026
1.0.x-dev Dev Jun 5, 2026