gpapf_intltelinput_options (JS)

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Change the number type used for placeholders
  5. Since

Description

Filter the options passed to intl-tel-input during initialization.

Usage

window.gform.addFilter( 'gpapf_intltelinput_options', 'my_custom_function' );

Parameters

Examples

Change the number type used for placeholders

window.gform.addFilter('gpapf_intltelinput_options', function(options) {
    /*
     * Allowed placeholderNumber types
     *
     * * 'FIXED_LINE_OR_MOBILE'
     * * 'FIXED_LINE'
     * * 'MOBILE' (default)
     * * 'PAGER'
     * * 'PERSONAL_NUMBER'
     * * 'PREMIUM_RATE'
     * * 'SHARED_COST'
     * * 'TOLL_FREE'
     * * 'UAN'
     * * 'UNKNOWN'
     * * 'VOICEMAIL'
     * * 'VOIP'
     */
    options.placeholderNumberType = 'FIXED_LINE_OR_MOBILE';

    return options;
});

Since

This filter is available since Gravity Forms Advanced Phone Field 1.0.12.