Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • aaeda 117 posts 150 karma points
    May 28, 2018 @ 06:18
    aaeda
    0

    Get IP address

    Hello

    I wanted to know if it is possible to have a dynamic field in umbraco forms (4.4.3). In fact, I wanted to display the IP address of the user filling in when the admin receives the form. I tried to add a default value [@Request.ServerVariables("REMOTE_ADDR")] but it not working. Any idea how this can be achieved?

    Thanks

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 28, 2018 @ 06:36
    Dennis Aaen
    0

    Hi aaeda

    Can you try to use the line below and let me know if it does what you want to do

    {@record.IP}

    Hope this helps

    /Dennis

  • aaeda 117 posts 150 karma points
    May 28, 2018 @ 07:04
    aaeda
    0

    Hi Dennis

    thanks a lot for your reply. I have tried but the field is blank. The forms version is 4.2.1 and not 4.4.3. It could be because of that?

  • Nurhak Kaya 53 posts 147 karma points MVP 3x c-trib
    May 01, 2019 @ 11:26
    Nurhak Kaya
    0

    Did you find a solution to this problem, please @aaeda?

    Before Umbraco Forms, I used to use Umbraco Contour for some of my projects and I could capture the IP details of the webuser simply by adding something like this; Client IP {record.ip}, but this and similar combinations don't seem to be working. I have tried @Dennis Aean's suggestion as well as it made sense, but it didn't work either.

    PS: Umbraco Forms logs the IP address details in the UFRecords table in the IP column. PS 2: Umbraco Forms version is 4.3.3

    UPDATE: Here is the solution;

    1. Go to your Umbraco Forms form
    2. Add Question, type will be Hidden
    3. Set Default Value as [@Remote_addr]

    That is it! Hope this helps if you need it!

Please Sign in or register to post replies

Write your reply to:

Draft