it is possible the geolocation to save data in separate fields?

By: Nicolas Stergio | Asked: 02/15/2023
ForumsCategory: Code Snippetsit is possible the geolocation to save data in separate fields?
Nicolas Stergio asked 2 years ago
I would like to separate the geolocation field in Four fields Country state city "address house number" It is possible to do something like that??? And if yes what is needed? Thanks a lot
2 Answers
Bobby Clapp answered 2 years ago
Nicolas Stergio replied 2 years ago

thanks a lot.
That is for displaying the fields.
i would like a way for the fields to be saved on differents fields in the same form that the user will put the geo address.
They can be invisible fields to the user. I need them for the search form. I want to use a lookup field in the search form.
Let me know please if their is a way to do that.
Thanks again for your kind help.

Bobby Clapp replied 2 years ago

Can you drop those same shortcodes into the form fields where you wish to collect the data within your form?

Nicolas Stergio replied 2 years ago

i do not understand what or how to do that?

Nicolas Stergio replied 2 years ago

and what kind of shortcodes...????

Bobby Clapp replied 2 years ago

If your address field is ID 60. Add a new field, hidden or whatever you want, and drop in the default value as [60 show="line1"]. Does that grab line 1 from the address field and drop it into the new field?

Nicolas Stergio replied 2 years ago

Unfortunately no. i also ask the support if that is possible and the say no. Any other way maybe? Thanks a lot for your time to help.

Nicolas Stergio replied 2 years ago

solution got found. i am posting that so you can also have it. the shortcode is
[frm-field-value field_id=xxx show=country]
Thanks for help.

Bobby Clapp replied 2 years ago

Nice find and thanks for sharing!

Nicolas Stergio replied 2 years ago

you direct me there. i have been asking support how to do that and they was telling me that it is not possible.
Thanks for your kind support

Nicolas Stergio replied 2 years ago

Unfortunately something is wrong. it is not working properly. just to let you know

Walter JonesWalter Jones answered 2 years ago
What is your work flow or reasoning for seperating the fields?  You’re not using the standard address field I assume?  You just have multiple text fields?

You basically want geolocation to work in each seperate field?  
Nicolas Stergio replied 2 years ago

hello i use the geolocation for address. I want to be able to do a search for those fields. I have an international directory. i want to be able to search for country state and city.
that it is possible with the address because all the data is in one field.
If choose the country i want to be able to check for states or cities in other countries that do not have states.
Thanks for asking.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right