FORMfields, the premiere web framework
Login
Support Home | Knowledge Base | Documentation | Forums | Contact Us
Info
FORMfields & FORMgen :: Field Customizations

Displaying an IP Address

(2075 views. Last Updated: 2009-07-08 1:29 PM)

He are 2 examples of how to display an IP Address. Simply add the following to your form's structure:

1. Style 1, use a DescriptionField:
$ffForm->addField(new DescriptionField("ip_warning", "Your IP Address is " . $_SERVER["REMOTE_ADDR"]));
Note: This method will not actually store the IP Address in your database. To store the IP Address, you should use the method below.

2. Style 2, use an IpAddressField:
$ffForm->addField(new IpAddressField("IP Address"));
$ffForm->formFields["ff_ip_address"]->setHidden(false);
Info
Support | Earn Money
Copyright © 2005-2019 Brain Book Software LLC.
Built with FORMfields, the premiere web framework.