-
-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x] Allow using Global Set variables in form email configs #8892
Conversation
@duncanmcclean Hey, is it possible to use page variables in the settings, too? Like |
No, it's not possible since the form emails have no context of the page you submitted the form on. To workaround that though, you could pass the page's title/ID along to the form as a hidden input then do whatever you need to do with it. |
I've added the fields hardcoded to the form:
The variables are shown on the website. Now I have to show the content in the mail subject. First and last name are shown in the subject, but not my fields. |
The fields need to exist in the form's blueprint. |
I've tried this, but I couldn't find a solution to show the variable content. Do I need to add my variable to the field, for example, as the default value? I've tried These are not working:
I have no idea, how I can define the field names and get the page content to send it with the form. |
This pull request allows for using Global Set variables in form configs.
Closes #2635.
Example
For example you could have a "Company Information" global with Name & Email fields.
Then, when configuring form emails, you'd be able to reference the global set data just like you would in a normal Antlers template:
{{ company_information:email }}