Skip Navigation

[Waiting for user feedback] unable to map repeatable group with Address field and Radio 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.

This topic contains 1 reply, has 1 voice.

Last updated by - 1 day, 9 hours ago.

Assisted by: Christopher Amirian.

Author
Posts
#2886487

Tell us what you are trying to do?
I'm defining a new custom post type that includes a repeatable field group consisting of an Address and Radio field type. The Radio field defines the type of facility associated with the address.

I've defined a template for the custom post type and included a view that lists the repeatable field group. When I attempt to place a Map block after the view and link it to the contents of the view, nothing shows on the map.

What is the link to your site?
hidden link

#2886819

Christopher Amirian
Supporter

Languages: English (English )

Hi,

The working pattern for addresses in repeatable field group items is to put the marker inside the View’s loop, using the map marker shortcode. Please try this:

- Go to “Toolset → Settings → Maps” and confirm the map provider and API key are set. Under “Cached data”, click “Load stored data” and delete any entries for these addresses, so they are looked up again.

- Edit the template and select the View that lists the repeatable group. Inside its loop, add a “Fields and Text” block, switch it to HTML mode and add:

[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-facility-address']
[types field='facility-type'][/types]<br>
[types field='facility-address'][/types]
[/wpv-map-marker]

- Replace map-1 with the map ID set in your Map block. Replace facility-address and facility-type with the slugs of your Address and Radio fields.
- In marker_field, keep the wpcf- prefix before the Address field slug.
- Save and reload the page.
- If you see duplicate markers, remove the marker source from the Map block settings.

For more information:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/
https://toolset.com/forums/topic/repeating-fields-cant-be-shown-and-some-block-layout-issues/

Thanks.