Skip to content

[6.x] Augment appended form config fields in emails - #15510

Open
lwekuiper wants to merge 1 commit into
statamic:6.xfrom
lwekuiper:fix/6.x-augment-form-config-in-email
Open

lwekuiper wants to merge 1 commit into
statamic:6.xfrom
lwekuiper:fix/6.x-augment-form-config-in-email

Conversation

@lwekuiper

Copy link
Copy Markdown
Contributor

#13111 augmented appended form config fields for Antlers, but only in Forms\Tags. The email view builds form_config the same way and was missed, so {{ form_config:* }} in an email template still receives raw, unaugmented values.

For scalar fieldtypes this goes unnoticed, since the raw and augmented values render the same. It shows up as soon as the appended field is something else: a Bard field renders its raw array (Array to string conversion), and an assets field hands you the filename string instead of an asset, so {{ form_config:download:permalink }} comes out empty.

This applies the same one-line change as #13111 to Forms\Email::addData(), plus a test mirroring the one added there.

Found while adding a per-form download to the submitter's email, where the appended config field points at the asset to link.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant