This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Capture an IP address?


  1. Beaverman
    Member

    I know i can prevent multiple sign ups from an IP address, but is there a way to capture the IP address in a form?

    Thanks in advance.

    Posted 16 years ago #
  2. hughestm
    Member

    The IP address is captured automatically. If you are viewing the entries for the form (Manage Form > Entries icon), there is a link to add fields (top right corner), and one of the fields to add is IP address. Also, when you download entries to excel or .csv, the IP will automatically be included. Lastly, you can find the IP address in your database. With something like phpMyAdmin, you should see a table named ap_form_n (where n is the form number), and you can view all of the data there as well.

    Posted 16 years ago #
  3. redityo

    like hughestm said.. you can get the ip address from view entry menu, User IP address saved along with form submission data. Or do you want to show user IP address when they go to your form ?


    MachForm Support

    Posted 16 years ago #
  4. Beaverman
    Member

    Thanks guys. Found it now.

    Posted 16 years ago #
  5. bendover
    Member

    Hi Redityo, is it possible to show the IP on the form and email it along with the form results?
    Since multipage is not possible, I want to mail the seperate forms along with the IP so I know they belong to each other.

    Posted 16 years ago #
  6. redityo

    Yes it's possible ..

    To show the IP in your form, try to edit "includes/view-functions.php" file and go around line 1840, you will see this code in there :

    <h1><a>{$form->name}</a></h1>

    Exactly bellow that line insert these code

    <div align="center">Your IP Address :{$_SERVER['REMOTE_ADDR']} </div>

    And to show IP address in mail notification, simply go to machform admin "emails" menu. Then set "content" section to use " {ip_address} template variable", by default "content" section value is :

    {entry_data}

    You can change it to

    {ip_address}
    {entry_data}

    MachForm Support

    Posted 16 years ago #

RSS feed for this topic

Reply