Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How can i hide the IP address from the results page ? I don't want other members to be able to see the ip address and I can't seem to find an answer to this.
P.S. i don't want to anonymize module
Help please
Comment | File | Size | Author |
---|---|---|---|
#10 | webform_hide_ip.zip | 1.76 KB | solideogloria |
Comments
Comment #1
pietpomp CreditAttribution: pietpomp commenteddid you try swapping tokens, under WEBFORM -> E-mails {edit} -> E-mail template?
From
%username
to%profile[name]
or%profile[profile_first_name]
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI don't want to alter emails as i don't use it.
The IP Address i want to be removed from is /webform-results/table
Comment #3
deweweb CreditAttribution: deweweb commenteddid someone find the solution?
Comment #4
deweweb CreditAttribution: deweweb commentedthe solution for it is to create own module "ip_hide" with two files inside - first ip_hide.info
; $Id: $
name = ip_hide
description = Hide IP from webformresults module.
core = 7.x
package = ip_hide
configure = admin/config/ip_hide
; Information added by drupal.org packaging script on 2012-05-13
version = "7.x-0.1"
core = "7.x"
project = "ip_hide"
datestamp = "1336890411"
and second is ip_hide.module
<?php
//hook_webform_submission_presave
function ip_hide_webform_submission_presave($node, &$submission) {
$last_ip_number = explode(".",$submission->remote_addr);
$submission->remote_addr = '***.***.'.$last_ip_number[2].'.'.$last_ip_number[3];
}
And enable module in Modules section
Comment #5
quicksketchThe original poster specifically said he didn't want to truly anonymize the submissions in the database, which is what the solution in #4 provides. There's also http://drupal.org/project/webform_anonymous which does the same thing with more granularity.
I'm consolidating issues similar to this one into #1733782: Provide options for managing IP Addresses (delete entirely, hidden on results, etc.), where we can consider adding IP address handling as a global setting in Webform.
Comment #6
ericjgruber CreditAttribution: ericjgruber commentedI ran into this issue today. My fix: edit the View for Webform Submissions (Webform submissions).
In that View, under Fields, click on the IP Address field that is exposed, and then click the remove button.
Be sure to save your View to make the change, and then it'll be gone.
Comment #7
DanChadwick CreditAttribution: DanChadwick commentedTo clarify, the view is in the 7.x-4.x branch.
Comment #8
suffering drupal CreditAttribution: suffering drupal commentedAnd how can the IP address be substituted by the Country name?
I have tried with all IP related modules like smart-ip, geo-ip, ip2country, iptocountry, ip2locale and all the other ip look-a-like modules, but no succes. I am sure it must be something simple but I have already lost a week on this.
In other words, how to substitute "Webform submissions: Remote address" for the country code in views?
"Smart IP: Country" shows the country of the current visitor, not the country of the visitor who submitted the webform.
Any help?
Comment #9
solideogloria CreditAttribution: solideogloria commentedThis option exists since the 6.1.x version.
All webforms
/admin/structure/webform/config/submissions > Submissions Behaviors > Disable the tracking of user IP addresses for all webforms
Per Webform
/admin/structure/webform/manage/MY_WEBFORM_ID/settings/submissions > Submissions Behaviors > Disable the tracking of user IP address
Comment #10
solideogloria CreditAttribution: solideogloria commentedI do also have a solution in D7. Here's a minimal example custom module for 7.x-4.x.
Comment #11
solideogloria CreditAttribution: solideogloria commented