Default value

Marat - September 30, 2007 - 07:03
Project:CCK IP Address
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Marat
Status:active
Description

Is it possible to fill this field with the current IP address?

#1

firebus - September 30, 2007 - 07:22

maaaayyyyybeee.

it would be pretty easy to grab the IP address from the environment variables.

i worry that the kind of user who would benefit from this feature is also the kind of person who doesn't know enough about networking to understand that they may be behind a NAT router, or they may have a dynamic IP address.

can you tell me more about the use case you are imagining?

thanks!

#2

Marat - October 1, 2007 - 15:16

Hi firebus,

Thank you for your replay. I am just wondering how to do that. I just added a new content type with several fields, one of them is IP address of the user. So, I know from where this node where was posted.

I tried to involve a PHP code for the default value of IP address field ... but it did not work with me!

Any more help will be much appreciated.

 
 

Drupal is a registered trademark of Dries Buytaert.