Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
great module, thanks for it!
If a source field's value is empty, the token expression is printed - which is ugly. It may be intended to ignore a value.
It would be great if an empty source field value would be treated as such by not writing anything of it into the target field.
It would be even better if this could be configured.
So if I would like to combine a string of two fields, the current behaviour e.g.:
"Contained things: [emtpy_field_token_printed], some tokenized value"
should become
"Contained things: , some tokenized value"
Then it is completely up to the user to design his strings.
Comments
Comment #2
maxilein CreditAttribution: maxilein commentedComment #3
haydent CreditAttribution: haydent commentedI couldn't agree more. I will update the code and push to the development version as I want to update the field formatter anyway. Should also be added to the Drupal 7 version.
Comment #5
haydent CreditAttribution: haydent commentedHi maxilein
Could you please try the latest dev version for Drupal 8?
I have included an additional checkbox on the field settings form to decide if you want to remove the empty tokens from the final string.
Comment #6
maxilein CreditAttribution: maxilein commentedHi hyadent,
thank you. I will try it tomorrow and let you know as soon as I have results.
Sounds great!
Comment #8
haydent CreditAttribution: haydent commentedSetting this to fixed as has been added into the latest release.