Skip to content

Commit 07c432e

Browse files
gpaa-single-line-as-input.php: Updated with instructions on using multiple address fields.
* Update gpaa-single-line-as-input.php Added instructions on how to use the snippet for multiple address fields. * Update gp-address-autocomplete/gpaa-single-line-as-input.php --------- Co-authored-by: David Smith <[email protected]>
1 parent 56d6e53 commit 07c432e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gp-address-autocomplete/gpaa-single-line-as-input.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*
88
* Use a Single Line Text field as autocomplete input and populate the Single Line Text field with the full address.
99
*
10+
* Supports multiple address fields by adding multiple configuration blocks at the end of the snippet.
11+
*
1012
* Note: This snippet will require the user to make a selection from the auto-suggested addresses.
1113
*
1214
* Plugin Name: GP Address Autocomplete - Use Single Line Text field as Autocomplete Input
@@ -130,10 +132,14 @@ public function is_applicable_form( $form ) {
130132

131133
}
132134

133-
// Configuration
135+
# Configuration
136+
137+
// Duplicate then modify the next 7 lines to add another address field
138+
// Configuration for the first address field
134139
new GPAA_Single_Line_Input( array(
135140
'form_id' => 123, // The ID of your form.
136141
'address_field_id' => 4, // The ID of the Address field.
137142
'single_line_field_id' => 5, // The ID of the Single Line Text field.
138143
// 'use_full_address' => true, // Uncomment to use the full street address if you don't want an abbreviated street address.
139144
) );
145+

0 commit comments

Comments
 (0)