-
I'd like to pass on additional information to the actions when the form is submitted. I use the visitor's IP address to determine the country of origin. Is there any way to "inject" such info? |
Beta Was this translation helpful? Give feedback.
Answered by
tobimori
Jul 26, 2024
Replies: 1 comment
-
You can configure DreamForm to collect the IP address with the following option // site/config/config.php
return [
'tobimori.dreamform' => [
'metadata' => [
'collect' => [
'ip',
// [...]
]
],
],
]; and then access the IP like so:
or in the Email action, you should be able to use
For other actions, like the Mailchimp action, the IP address is automatically included when the metadata collect option is enabled. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tobimori
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can configure DreamForm to collect the IP address with the following option
and then access the IP like so:
$submission->metadata()->ip()
or in the Email action, you should be able to use
{{ submission.metadata.ip }}
For other actions, like the Mailchimp action, the IP address is automatically included when the metadata collect option is enabled.