Home › Forums › General Issues › Fill repeater field within a group
Hello together!
I have a group with the field ID: field_62a0868f8e5fd
In this group I have different layouts. One layout has general fields and then 2 repeater fields (left and right).
I fill the fields with add_row which works fine for the “normal fields”. But the two repeater fields can not be filled. Can someone help me?
Attached is my code so far:
add_row('field_62a0868f8e5fd',
array(
'acf_fc_layout' => 'zweispalter',
'field_62a300bcf4d43' => 1,
'field_62a300eef4d45' => '1544',
'field_637bd0ff02baa' => 0,
'field_62a30147f4d47' => 'none',
'field_62a3015bf4d48' => 'big',
'field_62a302cf624f5' => array(
'field_62a30344883bc' => 0,
'field_62a30373883bd' => 'headline',
'field_62a305c117c04' => $zweispalterHeadline,
'field_62a3060717c05' => 'big'
),
'field_62a3071366959' => array(
'field_62a307146695b' => 0,
'field_62a307146695c' => 'text',
'field_62a3071466962' => $zweispalterText,
'field_62a3071466963' => 'small'
)
),$post_id
);
There are 2 repeater fields in my example.
The first repeater field is: field_62a302cf624f5
and the second repeater field is: field_62a3071366959
A repeater field requires and nested array
'field_62a302cf624f5' => array(
// nested array for each row
array(
// array of field key => value pairs
)
),
If I understand your question correctly, you want to display an Advanced Custom Fields (ACF) field if the current page is a child page of a specific parent page, called “Parent XYZ.”
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
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.