Forums

IP in email form

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.
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
Johang 24 Jan, 2014
Bob,

THX works perfect.
This topic is locked and no more replies can be posted.