Skip Navigation

[Resolved] How can I display the multiple instance of a single Toolset Map address field?

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 1 year ago.

Assigned support staff: Shane.

Author
Posts
#2216657

Tell us what you are trying to do?
I try to build a User CPT profile page.
In custom fields, I want to create an Address field with multiple instances where the user can add all his addresses in the world.
Is it possible to display all addresses in different lines?
Is it possible to display a map with a Marker for every single address, with the marker popup address information?
If yes, what should I do to have that?
Thank you

Is there any documentation that you are following?
I don't have found any documentation yet.

#2216867

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Francesco,

Thank you for getting in touch.
Is it possible to display all addresses in different lines?

Yes it is possible to do this. Assuming here that you're using the shortcode method to display the address fields then you can use our [wpv-for-each] shortcode.

Further details on this can be found below.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-for-each

Essentially this will allow you to loop through each of your fields and displaying them one at a time.

Is it possible to display a map with a Marker for every single address, with the marker popup address information?

This is also possible as well when making use of the wpv-for-each shortcode to list out the addresses.
What you can do is to add the marker inside the wpv-for-each shortcode and assign your address to each of the marker.

Here is an example below.

[wpv-for-each field='wpcf-my-field']
[wpv-map-marker map_id="my-map" marker_id="my-marker" marker_title="This is a marker" address="[types field='address'][/types]" ]This is the content of the marker popup.[/wpv-map-marker]

This should be able to assist you with setting this up. If there are any issues please let me know.
Thanks,
Shane