Home › Forums › General Issues › update_field not updating fiel › Reply To: update_field not updating fiel
Sorry, I see that if I use update_sub_field()
outside of have_rows()
, I must specify the row and parent. You said this:
update_sub_field(array('field_64b38c4e3ec56', 'field_64c782fc4c55d'), $value, $post_id);
I have tried:
$result = update_sub_field(array('field_64b38c4e3ec56', 'field_64c782fc4c55d'),5, 1074);
echo $result;
I get:
not a sub_field
0
I can see where I specify the parent, however, when do I speficy the row. I guess row would be used for a repeater field and assume 1 if not?
Thanks.
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.