Would be pretty useful to allow the usage of tokens in the replacement value itself, providing a "if field A is empty, use value from B" feature.

Comments

manuel.adan created an issue. See original summary.

andy_w’s picture

I agree, it would just need to be carefully protected to avoid an endless loop.

mostepaniukvm’s picture

Status: Active » Needs work
StatusFileSize
new727 bytes

Added very simple implementation.
But we still need to move it into token_default.manager

And maybe we need to consider adding some constraint to entity validation to avoid an endless loop

surya.s’s picture

Status: Needs work » Needs review
StatusFileSize
new900 bytes

Allow other tokens as replacement logic is written in TokenDefaultManager.php file. Attached the patch.

mostepaniukvm’s picture

StatusFileSize
new2.41 KB

Improved patch to prevent endless loop

  • andy_w committed 40d96f1 on 8.x-1.x authored by mostepaniukvm
    Issue #3086455 by mostepaniukvm, surya.s, andy_w: Allow other tokens as...
andy_w’s picture

Status: Needs review » Fixed
andy_w’s picture

Status: Fixed » Closed (fixed)