I want to get the value of ‘select’ field within my repeater field. The solutions I’ve found don’t seem to work – I think it’s because I’m within an array. Here’s my code – I want the H2 in this example to start with the label of the ‘area’ select field, instead of the value:
For nested fields such as your select field, you will need to make use of a repeater loop. This can be achieved by using the have_rows() loop and then call the select field within this by making use of the get_sub_field() function as described on this page: https://www.advancedcustomfields.com/resources/repeater/
I hope this info helps.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users