The google address field autocomplete not working if there is any conditional logic. Without conditional logic, it is working well.
Can you please generate the PHP code and share it with me? I've tried to create a simple case to show/hide the address field but do not see any issue.
Apologies for the trouble; I forgot to explain that it occurred when using the group field.
I have checked and found that it is related to my site only specifically for one of the post type. It throws the following error in console log as
Uncaught TypeError: Cannot set properties of null (setting 'value')
at Map.populateField (geolocation.js?ver=1671820208:54:44)
at Array.forEach (<anonymous>)
at Map.populateFromAddress (geolocation.js?ver=1671820208:33:39)
at yt.<anonymous> (geolocation.js?ver=1671820208:142:10)
at _.O (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:111:320)
at Hf (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:113:320)
at Hf (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:113:304)
at _.P.set (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:281:758)
at z$.So (js?libraries=places&key=AIzaSyAOZtBrBJUf9tuxWU_0bWvtFwJjLFAdxsc&ver=6.1.1:121:347)
Do you have any idea what is going wrong. I could not locate the mistake. Thanks for your effort on identifying the issue and time spending on this issue.
Hi, without conditional logic working fine. However, the same working in another group without problem.
Here is the text file containing the code for your reference.
I do not see a field with the address ID in your code as instructed in the documentation https://docs.metabox.io/extensions/meta-box-geolocation/#address-field
Also, the geo type should be an array of values, for example:
'types' => ['geocode'],
Can you please check recheck this?
Hi, I appreciate your suggestion. However, MB Builder was used to produce that code. Anyhow, I made the suggested attempts. No fruitful outcome. I've just used the MB plugin with default theme in troubleshooting mode for debugging.
Please watch the video that is provided.
Can you please export the field group to a JSON file? I will try to import it to my demo site and try to investigate the issue.
Please read more on the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import