Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page

Learn how to upgrade to the latest version.


Extends TextType with additional button which inserts current device ip address to input.

Type options


Required Javascript components

Component Description
../admin-dev/themes/new-theme/js/maintenance-page/ip-input.js Inserts current device ip address to input.

Code example

// path/to/your/CustomType.php

use PrestaShopBundle\Form\Admin\Type\IpAddressType;

class CustomType
    public function buildForm(FormBuilderInterface $builder, array $options)

Then in Javascript you have to enable IpInput component.

import IpInput from 'admin-dev/themes/new-theme/js/maintenance-page/ip-input';

// initialize the component

Preview example

IpAddressType rendered in form example