Document how to create a link to the form mode edit tab of a particular entity

Created on 19 June 2025, 5 days ago

Problem/Motivation

There are lots of ways to produce links based on routes in Drupal, but i cannot easily see what i expect should be a simple pattern to determine the route name for the edit page of a form mode after looking through the code under Routing for EnhanceEntityRouteSubscriber, FormModesSubscriber and under Plugin where the routes would be used to create links like FormModeManagerContextualLinks, and at #2700537: "No link template 'xxx' found for the 'xxx' entity type" β†’

… i thought i'd ask and suggest we document this.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

3.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mlncn
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    "entity.$entity_type_id.edit_form.{$this->formModeManager->getFormModeMachineName($form_mode['id'])}"

    looks like it, but we'd want to document the easiest way to get the form mode machine name and how to pass in the individual entity (ID) as a parameter when using the route to get a link to the entity's edit form mode.

  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA
Production build 0.71.5 2024