IP in email form

Include the sender's IP address in a ChronoForms email.

Overview

The email action in CF v5 does not have a built-in option to capture the sender's IP address.
Add a Custom Code action before the Email action to store the IP address in a variable, then insert that variable into your email template.

Answered
Jo Johang 22 Jan, 2014
I installed Chronoform V5 and it looks perfect.
I am setting up a new contactform but i a missing in the email action the possibility to include the IP adres of the sender.
Gr GreyHead 23 Jan, 2014
Answer
Hi Johang,

I don't think it's in the action yet but you can add it with a Custom Code action before the Email. I think this should work:
<?php
$form->data['ip_address'] = JRequest::getString( 'REMOTE_ADDR', '', 'server' );
?>
Then put {ip_address} in the Email template where you need it.

Bob
This topic is locked and no more replies can be posted.