I am an S2member PRO subscriber. I’d like to enable the Google Maps API to the address fields of my registration forms or other forms. Do you have any examples that demonstrate how to do this? WPForms has the capability to do this and I own that plugin as well. Is it possible to use a combination when creating the registration page?
Using Google MAPS API in my S2member contact form/ registration forms
I would imagine the process would be something like:
-
create a custom s2member signup form you can customise by adding a google maps field to
-
add a number of “Other Attributes” like onBlur and onChange to the address fields you would be adding.
-
These would trigger an javascript function which would update the google map but only if a sufficient number of the fields are filled in, this would help limit the number of calls to the google maps API thus keeping costs down.
Personally I’d put Street address, Town, Postcode and Country as required fields with an onChange function that only displays/updates the map once all four are filled in. At a guess.
Getting something like this working is really beyond the scope of a support forum and is more full blown development work which people would charge their time to do. If you want to chat about my doing that for you feel free to DM me.
Gerald,
Thank you for responding. I do code in PHP.and have the javascript function embedded in a code snippet that works My confusion, being new to S2member, is understanding where the code resides for the WP registration called in the S2member version (https://villagespoa.org/wp-login.php?action=register) and one created using Pro Forms (/POA/wp-content/themes/Divi/paypal-registration-form.php).
Any help or insight would be appreciated. Being new to S2member and API scripting has been a challenge. I’d be happy to share the snippet.