Skip Navigation

[Resolved] Extract address out of the Google maps api

This thread is resolved. Here is a description of the problem and solution.

Problem:

Add custom JS codes to Toolset forms.

Solution:

This is a custom JS codes problem, I suggest you check these:

https://toolset.com/forums/topic/extract-address-out-of-the-google-maps-api/#post-1184065

Relevant Documentation:

https://developer.mozilla.org/en-US/docs/Web/API/Console/log

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.41 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by stuart 5 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1183835

Hi guys - this is what I am trying to replicate.
https://toolset.com/forums/topic/output-location-field/

However its not populating the fields so I feel I have done something a bit wrong... or am missing a piece.

image attached hidden link

#1184065

Hello,

This is a custom JS codes problem, I suggest you check these:
1) Check if there is any JS errors in your website,
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#javascript-debugging

2) Debug your custom JS codes manually, line by line, make sure it does output the correct address value in each line, for example:

console.log( my_var_name );

This should be able to output variable value of "my_var_name"
hidden link

#1184548

It actually appears JQUERY was not loading on all of my CRED forms at all, I wasn't aware at the time of doing this
- it appears to be the WP-Rocket Plugin that caused it... and the code works with some modification to the existing thread.

Cheers