Make Node tokens available for use with Inline Entity Form

Created on 25 March 2023, over 1 year ago
Updated 5 August 2023, over 1 year ago

It would be nice to be able to include the Node Title (or other identifying info) as a token in the "Pattern for automatic name generation", in cases where Storage Entities are being created in via Inline Entity Form.

✨ Feature request
Status

Closed: outdated

Version

1.1

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States JLeMosy

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

Comments & Activities

  • Issue created by @JLeMosy
  • πŸ‡©πŸ‡ͺGermany mxh Offenburg

    The desired outcome is probably not easily achievable. You probably want to have the most recent value of the node title - that may just be entered in the form without being submitted before - within the storage entity's name, however the form processing is complex on inline entity forms.

    The only (partially) working concept could be using Context Stack β†’ :

    • Get the Context Stack module with composer require drupal/context_stack
    • Install context_stack_form sub-module with drush en context_stack_form
    • Configure the form display for the reference field using Inline entity form - Simple (Complex doesn't work with Context Stack)
    • Within the pattern for automatic name generation, you can then use for example Storage item for [current:form:node:title]

    However, this will probably only work with an already saved node that has a title. As said, probably the form processing that is involved here is so complex that it's hard to get the most recent title value here.

  • Status changed to Closed: outdated over 1 year ago
  • πŸ‡©πŸ‡ͺGermany mxh Offenburg
Production build 0.71.5 2024