New tab in link using ACF Link array

Hi,
I am using an ACF Link array field to define Link paramaters in PRO. It is working for the URL and the TITLE but I can’t figure out how to make the New Tab option work.

The ACF field: {{dc:looper:field key=“col1_link.target”}} returns:
“_blank” if new tab is checked in ACF.
an empty field if new tab is NOT checked.

If I put {{dc:looper:field key=“col1_link.target”}} in the New Tab fieid in PRO, it always opens a new tab.

I tried different Fallbacks: “false”, false, 0 but nothing works, it always open a new tab.

What am I missing or doing wrong?
Patrick

Hey Patrick,

Thanks for writing in! I would like to check your ACF fields and the returned value. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Sorry for the late reply. I gave you access in the secure note and made a Sandbox page for you to test with. https://staging.harvardhistory.org/ys/sandbox-pro/

The link is set in a component: Div-col-1

If you want to change the ACF fields, e.g. the link itself, click on Edit page in the topbar and look in the Blocks Section:


If you want to see the ACF field group, it is the Posts and Pages default:
image
NOTE: It can take a long time to load, be patient!
Look for field 42 blocks (repeater) and then 23: col1_link

As explained before, I can’t find how to set fallback in the New Tab field in PRO when the ACF value is empty.

I hope you have everything you need to help me out.
Thanks,
Patrick

Hello Patrick,

I do not have access to the dashboard. I want to check on the link URL output and if it is possible set a default value for the ACF field. I would recommend running the {{dc:looper:debug_consumer}} to carefully check the returned values.

Please see the secure note below.

Weird you can’t get to the dashboard. But thanks for the hint about debug_consumer. This is a great feature I didn’t know about and allowed me to debug this.

After re entering everything from scratch, turns out this syntax works perfectly:

Thanks for your help,
Patrick

You are most welcome, Patrick.

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