Skip to content

Commit b1c4d9f

Browse files
authored
gpapf-show-all-countries.php: Added snippet to show all countries in Advanced Phone Field for a specific form/field.
1 parent 705507d commit b1c4d9f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
* Gravity Perks // Advanced Phone Field // Show All Countries On Specific Field
4+
* https://gravitywiz.com/documentation/gravity-forms-advanced-phone-field/
5+
*
6+
* This snippet will show all countries in the flag picker for a specific form/field. It is useful if you have limited to specific countries
7+
* on the plugin settings, but want to allow all countries on a specific form/field.
8+
*/
9+
// Update "123" to your form ID and "4" to your Phone field ID.
10+
add_filter( 'gpapf_init_args_123_4', function( $args ) {
11+
$args['countriesAction'] = 'all';
12+
return $args;
13+
} );

0 commit comments

Comments
 (0)