Acf options field array single value

hi there,

I have made a repater field in ACF Pro. here there are 2 columns: Text and Options dropdown.
The options drop down field has 2 values (url : label)
when selecting label as output i get the text as output. all looks good.

what i need now: i want to switch to array to get both values with dc. but i haven’t managed to get both values separately yet. when i try to find out with {{dc:looper:debug_consumer}} which values i get, i see at the said field only the url without the text?

Index: 0
   Current Data:
   array(2) {
   ["field_604e0b532136b"]=>
   string(1) "2"
   ["field_604e0b882136c"]=>
   string(60) "https://url..........."
   }

field_604e0b532136b = the text field
field_604e0b882136c = the options dropdown with url:label

how can i get single values from field_604e0b882136c ?

thank you in advance
harry

Hi Harry,

If you use Looper Field (in Dynamic Content) you should be able to just enter in the name of the field exactly like you added it in ACF. So if you have a field called url you could use this: {{dc:looper:field key="url"}}

The debugger gives you the raw information of what is currently stored in the looper provider, but there’s another management layer for ACF repeater fields that lets you call them by name.

Hopefully this helps!

hi alex,
i dont get it to work. it is possible that i understand something wrong. i added some screenshots:

this is my field with the sub fields 1+2

this is my subfield 2, there i have the url (value) : label (description)

when i set set the return value to Beide (Array) = Both (Array) i get this:

when select Bezeichnung (label) get this:
acf_label_result

when selecting Wert (url) this:
acf_value_result

i am not able to select ONE out of the ARRAY. i tried all suggestions and things i found in the forum. but i t does not work.
what i try to archive: send the field: pro_paketinhalt_hinzugefugt field in array so i get both values.
then i wanna select one for the text (label) and the url for the link.
is this possible? or is this not possible since it is “one” filed but two values?

thanks again for your help.

cheers

Oh I see what you mean! I’m sorry, I misunderstood at first and thought this was inside a repeater field. If you’re using the options field type with Array as the return type you can access the content like this:

{{dc:looper:field key="value"}}
{{dc:looper:field key="label"}}