Field collection named tokens

Categories

Component ID

2745969

Component name

Field collection named tokens

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

137

Component created

Component changed

Component body

Imagine a field collection like pictured

You have a select box, then some other information.

You want to use a token to pull the text field associated with the select box - but oh NO!

Your users can reorder the field collection items, and your existing numeric-tokens don't work:

PA Info:
State: [node:field-state-license-number:0:field_state]
License: [node:field-state-license-number:0:field_license]

The "0" index is going to pull whatever the first value is.

This module allows you to use a select box to define named deltas, so the tokens can be accessed by a sub-field:

PA Info:
State: [node:field-state-license-number:pa:field_state]
License: [node:field-state-license-number:pa:field_license]