Locale

Language
English
English
English
French
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

InputPhone

Input for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods.

Basic
Localized
GEO IP Lookup
Disabled

<script>
    //<![CDATA[
    var myGeoIpLookup = function (success, failure) {
        $.get("https://ipinfo.io", function () {
        }, "jsonp").always(function (resp) {
            var countryCode = (resp && resp.country) ? resp.country : "";
            success(countryCode);
        });
    }
    //]]>
</script>
<h:form id="frmPhone">
    <p:messages id="msgs">
        <p:autoUpdate/>
    </p:messages>
    <div class="card">
        <h5>Basic</h5>
        <pe:inputPhone id="basic"
                       initialCountry="us"
                       value="#{inputPhoneView.phoneNumber}"
                       required="true"
                       requiredMessage="Basic is required!"
                       formatOnDisplay="true">
            <p:ajax event="countrySelect" listener="#{inputPhoneView.onCountrySelect}" process="@none"/>
        </pe:inputPhone>
        <p:commandButton value="Submit" update="@form" actionListener="#{inputPhoneView.submit}" styleClass="ml-3"/>

        <h5>Localized</h5>
        <pe:inputPhone id="localized"
                       initialCountry="nl"
                       onlyCountries="nl,be,de"
                       localizedCountries="{'nl':'Nederland','be':'België','de':'Duitsland'}"
                       value="#{inputPhoneView.localized}"/>

        <h5>GEO IP Lookup</h5>
        <pe:inputPhone id="geoIp"
                       initialCountry="auto"
                       geoIpLookup="myGeoIpLookup"
                       value="#{inputPhoneView.geoIp}">
        </pe:inputPhone>

        <h5>Disabled</h5>
        <pe:inputPhone disabled="true"/>
    </div>
</h:form>