What exactly do you expect this to do?
If you want the IP address then look at the client address in the HTTP request the form generates. If the form is dynamically creating an email on the client (i.e. not sending the form data back in an HTTP request) which you want to populate with some values then you'd need to set the values from the code which generates the HTML (javascript doesn't know about IP addresses) e.g. with PHP....
<input type=hidden name="env_report" value="<?php print $_SERVER['REMOTE_ADDR']; ?>">
Only it's trivial for someone to amend the contents of the email unless you also include some tamper detection....
<input type=hidden name="anti_tamper" value="<?php
print md5('s3cr3t' . $_SERVER['REMOTE_ADDR']);
?>">
...and validate on receipt.