ACF Repeater and Tel: LInk

Since ACF doesn’t natively support a phone field I created a field for it populated with a repeater with 3 numbers. These also feed a small director CPT.

The fields all function fine in any dynamic content situation I used them as the button text, as an example.

When I go to use them {{dc:looper:field key=“area_code”}}{{dc:looper:field key=“ph_prefix”}}{{dc:looper:field key=“ph_line”}} in the Phone link entry the Preview only shows the query and not the rendered numbers. This translates to a blank result for the tel: link when the site renders.

I tried a basic number field as well and it also remains blank so it seems a custom field cannot be used with the Tel: link currently.

You can perform a workaround by adding the Tel: prefix for the link manually i.e. tel:{{dc:looper:field key=“area_code”}}{{dc:looper:field key=“ph_prefix”}}{{dc:looper:field key=“ph_line”}}

1 Like

Hey @dabigcheeze,

Thanks for reaching out!

Would you mind sharing your credentials so that we can check your setup properly? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

No real need to give you access. You can recreate the problem yourself in 30 seconds. If that doesn’t work then I’ll talk with my client but they aren’t open to anyone having direct access to their data. Just try and pull in a number to a Tel: link within a button and it doesn’t work. I tried it on two other sites and the problem happens across them all.

Hi @dabigcheeze,

I have replicated the issue by using the Custom Field value in the Tel link on the Button element. I suspect this could be a bug on the latest version theme and have reported it to the developers for further investigation.

Thanks

Just want to note that this seems to be an issue for any URL field that’s attempting to use an ACF custom field value. For example, I have a custom text field called “agent_page_url” . I’ve defined really simple relative URL values to for the field to test and so far it’s not working. I can’t use it in an in a simple link in HTML, a button element, a div that’s configured to use a URL, etc.

Definitely going to be a problem for me if there’s not a fix soon.

Hi @j0hnwat3rman and @dabigcheeze,

My colleague already added this in our issue tracker and rest assured that our developers will check on it. In the meantime, if you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.