Change initial country + add top countiries on Caldera forms

82

/**
 * Change default country on Caldera forms
 */
add_filter( 'caldera_forms_phone_js_options', function( $options){
	//Use ISO_3166-1_alpha-2 formatted country code
	$options[ 'initialCountry' ] = 'ZA';
	$options[ 'preferredCountries' ] = array( 'ZA', 'SWZ', 'LSO' );
	return $options;
});

Comments

Submit
0 Comments