Hello,
I'm using the form plugin to save email of the visitor. I also want to save the IP address off the visitor. How should I do that? I can use another twig template as a body, but I can't write PHP directly in the twig...
My form:
form:
name: subscribe
action: /
fields:
- name: email
label: Email
placeholder: Enter your email address
type: text
vertical: false
validate:
rule: email
required: true
buttons:
- type: submit
value: Submit
process:
- save:
fileprefix: subscribe-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}"
- message: Thank you!
- display: /thankyou
Thanks for your help