gpapf_intltelinput_options (JS)
Description
Filter the options passed to intl-tel-input during initialization.
Usage
window.gform.addFilter( 'gpapf_intltelinput_options', 'my_custom_function' );
Parameters
intlTelInputOptions intlTelInput.Options
The intlTelInput options. See the available options.
formId number
The ID of the current form.
fieldId number
The ID of the current field.
instance GPAdvancedPhoneField
The current instance of
GPAdvancedPhoneField
.
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.