File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 2
2
* Gravity Perks // Address Autocomplete // Always Use Short Name for State / Province / Region
3
3
* https://gravitywiz.com/documentation/gravity-forms-address-autocompate/
4
4
*
5
- * This was develope for a customer using Address Autocomplete in Italy. The province was retuned as
5
+ * Instruction Video: https://www.loom.com/share/f39708854d504d32902b5fca29e73213
6
+ *
7
+ * This was develope for a customer using Address Autocomplete in Italy. The province was retuned as
6
8
* "Città Metropolitana di Torino" where they wanted to use the province code instead (e.g. "TO").
7
9
*/
8
- gform . addFilter ( ' gpaa_values' , function ( values , place ) {
9
- for ( var i = 0 ; i < place . address_components . length ; i ++ ) {
10
- var component = place . address_components [ i ] ;
11
- if ( component . long_name === values . stateProvince ) {
12
- values . stateProvince = component . short_name ;
13
- }
14
- }
15
- return values ;
16
- } ) ;
10
+ gform . addFilter ( " gpaa_values" , function ( values , place ) {
11
+ for ( var i = 0 ; i < place . address_components . length ; i ++ ) {
12
+ var component = place . address_components [ i ] ;
13
+ if ( component . long_name === values . stateProvince ) {
14
+ values . stateProvince = component . short_name ;
15
+ }
16
+ }
17
+ return values ;
18
+ } ) ;
You can’t perform that action at this time.
0 commit comments