Autocomplete issue with 'id' and binding
Support › MB Geolocation › Autocomplete issue with 'id' and binding
- This topic has 3 replies, 2 voices, and was last updated 9 years, 1 month ago by
Sinusite.
-
AuthorPosts
-
September 19, 2016 at 7:34 PM #4114
Sinusite
ParticipantHi,
See : https://support.metabox.io/topic/autocomplete-issue/
I think i found the weird bug of the year...I have this :
array('id' => "{$prefix}weirdid",'type' => 'text','std' => '0'), array( 'type' => 'text', 'name' => 'Rechercher une adresse sur la carte', 'id' => 'address_geo', 'tooltip' => array( 'icon' => 'help', 'content' => 'Trouver sur la carte : position GPS, adresse postale...', 'position' => 'right' ), ), array( 'id' => 'geo_latlong', 'name' => 'Carte', 'type' => 'map', 'std' => '45.902723, 6.123793', 'address_field' => 'address_geo', 'js_options' => array( 'scaleControl' => 'true' ) ), array( 'id' => 'prj_115', 'type' => 'custom_html', 'std' => '<br>' ), array( 'name' => 'Adresse du projet', 'id'=> "{$prefix}adresse1", 'type' => 'text', 'binding' => 'street_number + " " + route' ), array( 'name' => 'Code postal', 'id' => "{$prefix}cp", 'type' => 'number', 'binding' => 'postal_code' ), array( 'name' => 'Commune concernée', 'id' => "{$prefix}commune", 'type' => 'taxonomy', 'taxonomy' => 'taxo_commune', 'placeholder' => 'Choisir une commune', 'field_type' => 'select_advanced', 'js_options' =>array('theme' => 'classic' ), 'query_args' => array( 'include' => $args_communes ), 'columns' => 3, ), array( 'type' => 'text', 'name' => 'Geometry', 'id' => 'geometry'),When i select in autocomplete adress, the "{$prefix}weirdid" is filled by someting like ad0597fb2e844f7c922914747616ad2c5d037130
I have found to way to fix this....
1 - add , binding => '' to {$prefix}weirdid (but why ?...)
2 - remove 'id' at weirdid... in fact if you type any word ending by '-id'... the field is binding by the 'hash' ! (but why ???...)Any idea ?...
September 21, 2016 at 2:44 PM #4122Tan Nguyen
ParticipantHmm, that's weird, let me check and tell you when I found the problem đŸ™‚
September 26, 2016 at 12:23 PM #4146Tan Nguyen
ParticipantDear Sinusite,
This bug cause when
idis one of Google address components, and Geolocation match with any field which contains address components instead of match exactly with it. I've fixed the logic so it doesn't auto populate withany_idfield. Please update to 1.1.1 which have patch for it.Thanks for reporting and best regards,
Tan
September 30, 2016 at 8:35 PM #4198Sinusite
ParticipantDone. Thank You !
-
AuthorPosts
- The topic ‘Autocomplete issue with 'id' and binding’ is closed to new replies.