Skip to content

Commit

Permalink
gpapf-set-default-country-for-specific-field.php: Added a new snipp…
Browse files Browse the repository at this point in the history
…et that demonstrates how to set the default country for a specific Phone field.
  • Loading branch information
spivurno authored Jun 27, 2023
1 parent 42be439 commit ecb897d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Gravity Perks // Advanced Phone Field // Set Default Country for a Specific Field
* https://gravitywiz.com/documentation/gravity-forms-advanced-phone-field/
*/
// Update "123" to your form ID and "4" to your Advanced Phone Field's ID.
add_filter( 'gpapf_init_args_123_4', function( $args ) {
$args['defaultCountry'] = 'GB';
return $args;
} );

0 comments on commit ecb897d

Please sign in to comment.