How to set hidden field value to the IP address of the user?
I need to capture the user's IP address and set the value in a hidden field. How would you advise I would go about this?
I have tried the simple way of adding the following variable in the default field:
{@record.IP}
but this returns an empty value. I don't really want to make a query to Umbraco's UFReords table. Is there something I need to add to allow this magic string to work?
How to set hidden field value to the IP address of the user?
I need to capture the user's IP address and set the value in a hidden field. How would you advise I would go about this?
I have tried the simple way of adding the following variable in the default field:
but this returns an empty value. I don't really want to make a query to Umbraco's UFReords table. Is there something I need to add to allow this magic string to work?
Thank you in advance.
You should be able to fetch the users current IP with
[@Remote_addr]
. If the IP is saved in a field of a member, you could use{member.FOO}
.Documentation on magic strings can be found here: https://our.umbraco.com/documentation/Add-ons/umbracoforms/developer/Magic-Strings/
is working on a reply...