I Currently writing a form for user to create a new record that require user's IP address.
I have this ready: $this->getObject()->setIp(ip2long($sf_request->getRequest()->getHttpHeader ('addr','remote')));
But it is obvious that I do not have the $sf_request object in my Form model. How can I access to this and get the user's IP address?
Thank you