Multiple-value fields are a pain on entities. Webform Tokens gets around this by providing tokens for each checkbox value.

Consider doing something like this (if Entity Token or another module doesn't already).

Reference issue: #1895518: Checkboxes again

Comments

emilorol’s picture

Hi,

This is just an idea:

What if the transformation box can support PHP so that an string match can be executed and the return will be the key|value pair?

Just one more:

What about some sort of special token like [multiline-field:field-name:value] that comes with the module?

emilorol’s picture

One more thought:

If I read the module code correctly the line "KEY|VALUE" is split and a simple string replace will replace the KEY with the VALUE. What if instead of a str_replace we use a preg_replace, that should do the trick.

wizonesolutions’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Issue summary: View changes
Issue tags: -fillpdf2
jwjoshuawalker’s picture

I am about to code a solution for this, unless someone has already gone down this path.

Hopefully where I wind up solves more than just my needs.

wizonesolutions’s picture

That'd be great. Ideally it'd be a Token-compatible solution (most likely :first, :value(0), :last, etc.). I wonder if array tokens already handle that, but I don't recall and seem to be under the impression that they don't.

liam morland’s picture

Category: Task » Feature request
liam morland’s picture

Version: 7.x-1.x-dev » 8.x-4.x-dev

Features need to be added to 8.x after which they can be backported.

jwjoshuawalker’s picture

I wound up making a custom module that merged fields and called fillpdf functions from within.

Nothing worth sharing :(