[Résolu] I need to save the latitude and longitude to the database when selecting address
This support ticket is created Il y a 7 années et 2 mois. 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.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
Hi I need to save the longitude and latitude as two custom fields, as i need to use them in another process.
I can see you have them in `wp_options`.`option_name`= 'toolset_maps_address_coordinates' , but unfortunately i really need them in the wp_postmeta table with the post ID.
Is there any way to save longitude and latitude when someone selects address.
Hello. Thank you for contacting the Toolset support.
Well - When you use Toolset map address field and save the address field it saves the address as text in postmeta table.
As I understand - you have Toolset map address field associated with your custom post type and when you save the post you would like to save latitude and longitude as custom field - correct?'
If you tell me from where you are adding the post I can guide you in right direction.
Yes, that is correct, I have two posts that I have addresses that I need to save longitude and latitude for, one is a form called Location and another called Inquiries, Inquiries has two addresses that I need to save the information on.
Well - you should have two custom fields - latitude and longitude to store respective latitude and longitude value from map address field. You should use WordPress native hook save_post to store the latitude and longitude values respectively.
If you do not know how to do this, I may help you to achive this but I need problem URL where of post for which post type post you would like to store latitude and longitude values respectively.