Skip Navigation

[Resolved] Multiple address fields

This support ticket is created 6 years, 8 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#617839

Hi there,

I have the following problem:

When I add the address field to a custom post type, the user needs to fill in the whole address on 1 line.
Google autocomplete will popup when you start typing, but when you for example only typed your streetname and click on the autocomplete suggestion, the address misses information.

So I would like to add the address as multiple fields:
- Streetname
- Zip code
- City
- State
- Country

When creating separate fields for the address, do those field need to be address fields or could I use the single text line?

And how can I display the complete address on the maps?

#618236

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you cant divide the Maps Address field. There is no way to do so But When you say separate field - its possible that you should create separate field using textbox field type for Streetname, zip, city, state etc..etc..

And later on at front-end when you want to try to load map, you should combine those text field values and make one string and load the marker.

#618249

"And later on at front-end when you want to try to load map, you should combine those text field values and make one string and load the marker."

How exactly can I do this, could you give me an example of the code?

The current code I use to display 1 marker on the map:

{!{wpv-map-render map_id='map-2' map_height='200'}!}{!{/wpv-map-render}!}

{!{wpv-map-marker map_id='map-2' marker_id='marker-1' marker_field='wpcf-adres'}!}{!{/wpv-map-marker}!}
#619071

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - have you added those separate fields to hold state, city, zip values? If yes:

Could you please share problem URL and access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.