Skip to content

Commit 42a6141

Browse files
authored
Update gpaa-single-line-as-input.php
Added instructions on how to use the snippet for multiple address fields.
1 parent 56d6e53 commit 42a6141

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 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,12 @@ public function is_applicable_form( $form ) {
130132

131133
}
132134

133-
// Configuration
135+
// Duplicate then modify the next 7 lines to add another address field
136+
// Configuration for the first address field
134137
new GPAA_Single_Line_Input( array(
135138
'form_id' => 123, // The ID of your form.
136139
'address_field_id' => 4, // The ID of the Address field.
137140
'single_line_field_id' => 5, // The ID of the Single Line Text field.
138141
// 'use_full_address' => true, // Uncomment to use the full street address if you don't want an abbreviated street address.
139142
) );
143+

0 commit comments

Comments
 (0)