Answers for "Set Countries To Appear At The Top Of The Caldera Forms Phone Field List"

PHP
0

Set Countries To Appear At The Top Of The Caldera Forms Phone Field List

<?php
/**
* Set preffered countries for Caldera Forms phone fields
*/
add_filter( 'caldera_forms_phone_js_options', function( $options){
	//Use ISO_3166-1_alpha-2 formatted country code
	$options[ 'preferredCountries' ] = array( 'MX' );
	return $options;
});
Posted by: Guest on June-29-2021

Code answers related to "Set Countries To Appear At The Top Of The Caldera Forms Phone Field List"

Browse Popular Code Answers by Language