Reviewed & tested by the community
Project:
Form mode manager
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2023 at 10:29 UTC
Updated:
8 Aug 2025 at 16:05 UTC
Jump to comment: Most recent
Comments
Comment #2
pasqualleIt seems implementing hook_gin_content_form_routes() solves the problem.
Please register all the new routes with this hook.
As a quick workaround, the hook can be used in a custom module as:
Comment #5
kopeboyThank you, this works while editing entities, but how to target the /node/add/[note_type]/[form_mode] forms?
I tried
and they don't work.
EDIT: I found it by installing devel module and going to /devel/routes
=> it was
node.add.[form_mode](weird that the pattern is different...)
Comment #6
kopeboyComment #7
luenemannI came up with this:
Comment #11
tim-dielsAdded the code from the latest comment as a MR as this worked for me.
Comment #12
tim-dielsComment #13
tim-dielsFound an issue when using elasticsearch to index nodes. So will need to add an extra check.
Comment #15
mlncn commentedBack to needs review then, this looks like. Great work, thanks!
Comment #16
megakeegman commentedApplied the issue fork and it still looks good!
Comment #17
niklp commentedI use this method elsewhere and it seems robust, haven't tested this directly yet but +1 for the approach.